UIAlertView

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];

  • UIAlertViewStyleSecureTextInput//密码框  
  • UIAlertViewStylePlainTextInput//文本输入框
posted @ 2014-05-09 15:36  ejllen  阅读(93)  评论(0编辑  收藏  举报