How to fire uibarbuttonitem click event programmatically

后端 未结 8 2330
旧时难觅i
旧时难觅i 2020-12-05 05:41

I have created a UIActionSheet

UIActionSheet * action = [[UIActionSheet alloc]initWithTitle:@\"\"
                                                       


        
8条回答
  •  天涯浪人
    2020-12-05 06:07

    @ton1n8o 's solution worked for me. Here is the implementation in swift:

    UIApplication.sharedApplication().sendAction(barButtonItem.action, to: barButtonItem.target, from: nil, forEvent: nil)
    

提交回复
热议问题