ios - Two text field in alert view, with space between them -
i have uialertview text fields. can me how should have space between them ?
newboatalert.alertviewstyle = uialertviewstyleloginandpasswordinput; uitextfield * alerttextfield1 = [newboatalert textfieldatindex:0]; alerttextfield1.keyboardtype = uikeyboardtypedefault; alerttextfield1.placeholder = @"name"; uitextfield * alerttextfield2 = [newboatalert textfieldatindex:1]; alerttextfield2.frame=cgrectmake(alerttextfield1.frame.origin.x, alerttextfield1.frame.origin.y+alerttextfield1.frame.size.height+10, alerttextfield1.frame.size.width, alerttextfield1.frame.size.height+40); alerttextfield2.keyboardtype = uikeyboardtypedefault; alerttextfield2.placeholder = @"description"; alerttextfield2.securetextentry=no;
now looks :
you can't edit built-in uialertview
styles apple provides (at least not without dirty hacks broken next ios release).
if want customise how alert looks, example adding space between text fields, should create own uiview
subclass , implement own alert ui scratch.
also, if choose use apple's built in alert instead of rolling own, uialertview
deprecated, , should using uialertcontroller
instead. provides same features textboxes, plus more customisation options buttons (you still can't change layout though).
Comments
Post a Comment