http://blog.csdn.net/developer_zhang/article/details/8825822
1.普通弹框
- (void)viewDidLoad
{
[super viewDidLoad];
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Title" message:@"Message"
delegate:nil cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Ok", nil];
[alertView show];
}
2.带输入框的Alert
加一行:[alertView setAlertViewStyle:UIAlertViewStyleLoginAndPasswordInput];
原文:http://www.cnblogs.com/ejllen/p/3719035.html