Quantcast
Channel: Active questions tagged uipickerview - Stack Overflow
Viewing all articles
Browse latest Browse all 592

How to add UIPickerView in UIAlertController?

$
0
0

Could anyone help me I don't have any idea to do this. I have this class like

import Foundationimport UIKitclass Alert {    func loginAlert(viewController : UIViewController , callback: (result: Bool) -> ()) {        var alert = UIAlertController(title : "Compose",            message : "Fill the following",            preferredStyle: UIAlertControllerStyle.Alert        )        var loginAction = UIAlertAction(title: "Send", style: UIAlertActionStyle.Default){            UIAlertAction in        }        var cancelAction = UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Cancel){            UIAlertAction in            callback(result: false);        }        alert.addAction(loginAction)        alert.addAction(cancelAction)        alert.addTextFieldWithConfigurationHandler { (textField) -> Void in            textField.secureTextEntry = true            textField.placeholder = "Message"        }        viewController.presentViewController(alert, animated: true, completion: nil)    }}

I read about addTextFieldWithConfigurationHandler it seems it only just for textfield, I wonder how could I do this. Could anyone help me, any comment and suggestion would do. Thanks in advance.


Viewing all articles
Browse latest Browse all 592

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>