uialertview - Put a gap in between two views in Swift Alert -


i created alert view 2 text field user enter details. alert view generated programmatically shown below. there way put gap in between 2 text field?.

 let alertcontroller = uialertcontroller(title: "register", message: "", preferredstyle: .alert)  alertcontroller.addaction(okaction)  alertcontroller.addtextfieldwithconfigurationhandler { (textfield) in     textfield.placeholder = "name"     textfield.keyboardtype = .emailaddress }  alertcontroller.addtextfieldwithconfigurationhandler { (textfield) in     textfield.placeholder = "email"     textfield.securetextentry = false }  alertcontroller.addtextfieldwithconfigurationhandler { (textfield) in     textfield.placeholder = "company"     textfield.securetextentry = false }           self.presentviewcontroller(alertcontroller, animated: true) {             // ...         } 

here screenshot

i can suggest better way. create custom xib file , use present view controller create alert box shown below.

 let vc = customalertviewcontroller()     self.presentviewcontroller(vc, animated: true, completion: nil) 

you can refer following repo https://github.com/mattneub/custom-alert-view-ios7


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -