Adding TextField to UIAlertView

前端 未结 9 1356
不知归路
不知归路 2021-02-12 12:38

I need to add a TextField to an UIAlertView. I understand that apple discourage this approach. So is there any library that i could make use of to add

9条回答
  •  隐瞒了意图╮
    2021-02-12 13:03

    As of iOS 8 UIAlertView has been deprecated in favor of UIAlertController, which adds support for adding UITextFields using the method:

    - (void)addTextFieldWithConfigurationHandler:(void (^)(UITextField *textField))configurationHandler;
    

    See this answer for an example.

提交回复
热议问题