Snail—UI学习之提醒框UIAlertView
来源:互联网 发布:php找源码 编辑:程序博客网 时间:2024/06/05 04:03
<pre name="code" class="objc">- (void)createAlertView{ //delegate已经是self了 UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"友情提示" message:@"您好" delegate:self cancelButtonTitle:@"确定" otherButtonTitles:@"ss",@"取消",@"撤销", nil]; [alert show]; [self.view addSubview:alert]; }//alertView的代理方法- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ //alertView判断是哪一个提示框 //buttonIndex 最下面那个按钮下标是 0 其他的按钮从上往下从1依次增加 if (buttonIndex == 0) { NSLog(@"确定"); }else if (buttonIndex == 2){ NSLog(@"取消"); }else if (buttonIndex == 3){ NSLog(@"撤销"); }else if (buttonIndex == 1){ NSLog(@"ss"); } }
效果图
0 0
- Snail—UI学习之提醒框UIAlertView
- Snail—UI学习之初识
- Snail—UI学习之UILabel
- Snail—UI学习之UIButton
- Snail—UI学习之动画Animations
- Snail—UI学习之UITextField
- Snail—UI学习之进度条UIProgressView
- Snail—UI学习之UISegmentControl
- Snail—UI学习之开关UISwith
- Snail—UI学习之工具栏UIToolBar
- Snail—UI学习之UITableView之分组显示
- Snail—UI学习之UITableView之自定义UITableViewCell
- Snail—UI学习之得到某组件的方法
- Snail—UI学习之UIImage及UIImageView
- Snail—UI学习之自定义通知NSNotification
- Snail—UI学习之导航视图控制器UINavigationController(系统)
- Snail—UI学习之自定义导航栏NSNavigationController
- Snail—UI学习之代理传值Delegate
- 前端学习常用网址
- 并查集
- JDK 1.8 签名
- 如何把Android的一款自定义仪表盘控件整合到你的项目里
- python的除法
- Snail—UI学习之提醒框UIAlertView
- 【OSPF】防环机制详解
- 黑马程序员----this与super
- 用Chrome调试js
- 售价或达五六万美元,让人密恐的诺基亚虚拟现实设备OZO是个什么球?
- HTTPS的3种实现方法
- 视频编码标准汇总及比较
- 怎么写好一份数据分析报告?
- 【读书笔记】Linux高性能服务器编程(第二篇 第十三章)