UIAlertView *alertViewChangeName=[[UIAlertView alloc]initWithTitle:@"Change Name" message:@"What is your teacher's name?" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil];
alertViewChangeName.alertViewStyle=UIAlertViewStylePlainTextInput;
[alertViewChangeName show];
我只是想从文本框中检索输入并将其放置在UILabel或NSString中以供以后使用和/或操作。
您将需要调用UIAlertView's
委托方法
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
NSString *test = [[alertView textFieldAtIndex:0] text];
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句