uitextfield - Add Text into Alertview textfield iOS -
when alert view shows want have existing text within textfield. code, must add?
uialertview* dialog = [[uialertview alloc] initwithtitle:@"title" message:@"message" delegate:self cancelbuttontitle:@"cancel" otherbuttontitles:@"add", nil]; [dialog setalertviewstyle:uialertviewstyleplaintextinput]; // change keyboard type [[dialog textfieldatindex:0] setkeyboardtype:uikeyboardtypedefault]; [dialog show];
uialertview* dialog = [[uialertview alloc] initwithtitle:@"title" message:@"message" delegate:self cancelbuttontitle:@"cancel" otherbuttontitles:@"add", nil]; [dialog setalertviewstyle:uialertviewstyleplaintextinput]; [[dialog textfieldatindex:0] setkeyboardtype:uikeyboardtypedefault]; [[dialog textfieldatindex:0]settext:@"your string here"]; [dialog show];
Comments
Post a Comment