UIAlertView弹出框的简单使用
来源:互联网 发布:jsonobject数组 编辑:程序博客网 时间:2024/05/29 06:37
- (void)createNavBtn{ UIBarButtonItem *leftItem = [[UIBarButtonItem alloc] init]; leftItem.title = @"返回"; [leftItem setTarget:self]; [leftItem setAction:@selector(clickedLeftItem)]; self.navigationItem.leftBarButtonItem = leftItem; UIBarButtonItem *rightItem = [[UIBarButtonItem alloc] init]; rightItem.title = @"交卷"; [rightItem setTarget:self]; [rightItem setAction:@selector(clickedRightItem)]; self.navigationItem.rightBarButtonItem = rightItem;}/** * 点击了rightItem */- (void)clickedRightItem{ //弹出提示框 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"时间还多,确定要交卷吗?" delegate:self cancelButtonTitle:@"不,谢谢" otherButtonTitles:@"我要交卷", nil]; [alert show];}/** * 点击了leftItem按钮 */- (void)clickedLeftItem{ //弹出提示框 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"时间还多,确定要离开考试吗?" delegate:self cancelButtonTitle:@"不,谢谢" otherButtonTitles:@"我要离开", nil]; [alert show];}#pragma mark - UIAlertViewDelegate- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ switch (buttonIndex) { case 0: //取消 break; case 1: //确定 { [self.navigationController popViewControllerAnimated:YES]; } break; }}
0 0
- UIAlertView弹出框的简单使用
- Swift UIAlertView 的简单使用
- iOS 中UIAlertView 的简单使用
- 自动关闭UIAlertView弹出框
- UIAlertView 的简单总结
- UIAlertView的简单用法
- IOS-弹出框实现 官方UIAlertView的动画
- ios--UIAlertView多种带输入控件的弹出框
- (UIAlertView)封装的弹出框和风火轮
- 利用UIWindow自定义类似UIAlertView的弹出框
- UIAlertView 简单的弹出视图 用于TableViewCell中适用于简单的接口测试
- 2.1 UIAlertView,UIActionSheet,UIDatePicker,UIPickerView使用的简单总结
- UIAlertView 多个输入框的使用
- UIAlertView的使用
- UIAlertView的使用
- UIAlertView的使用
- UIAlertView,UIActionSheet的使用
- UIAlertView的一些使用
- oc 数组杂记
- 【android】自定义View之小试牛刀
- Theano:线性回归
- Linux多线程实践(1) --线程理论
- R类中无法生成资源标识
- UIAlertView弹出框的简单使用
- 红黑树算法的实现与剖析
- sqlldr 加载数据
- 杭电-1875畅通工程再续
- JAVA反射机制的学习
- linux下X86架构IDT解析
- invalid username/password logon denied
- C++ 二值图像连通区域标记
- 理解ThinkPHP当中的D方法