`
zheyiw
  • 浏览: 997209 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

模态对话框 UIAlertView

阅读更多

//显示双按钮对话框
- (void)showDialog2bt:(NSString*)msg bt1:(NSString*)bt1Title bt2:(NSString*)bt2Title{
    UIAlertView *alert =[[UIAlertView alloc] initWithTitle:@"" 
                                                   message:msg
                                                  delegate:self 
                                         cancelButtonTitle:bt1Title
                                         otherButtonTitles:bt2Title,nil];
    [alert show];
}

//响应事件
- (void)alertView:(UIAlertView*)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{

       if (buttonIndex == 0) {
            
       }else if (buttonIndex == 1) {

       }
}

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics