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.