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 -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -