UIAlertView
来源:互联网 发布:日本j2联赛网络直播 编辑:程序博客网 时间:2024/05/16 23:57
基本属性
1.initWithTitle:设置标题
2.delegate:设置Alert的委托, 设成self
//提醒视图(UIAlerView的创建)
//1.创建
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"标题" message:@"信息" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定",@"其他信息", nil];
//2.显示
[alertView show];
[alertView release];
//alertView的协议方法
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
//默认的取消按钮 buttonIndex为0
//其他按钮依次为1 2 3 。。。
NSLog(@"%ld", (long)buttonIndex);
if (1 == buttonIndex) {
NSLog(@"确定");
}
}
0 0
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- UIalertView
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- linux上搭建adb 环境
- 关于 struts2 中 prepare 接口实现数据准备
- LeetCode Combination Sum
- Android app应用调用系统关机菜单
- 一路走来
- UIAlertView
- linux 下 mysql的相关命令
- SpringMVC经典系列-04基于Spring3.1注解的方式进行项目开发---【LinusZhu】
- iOSUI视图控制下的各种触摸方法及实现
- CentOS下安装JDK7
- 看懂Gradle脚本(5)- 跟Gradle学领域驱动设计
- 背景色的半透明
- android之android:paddingLeft和android:layout_marginLeft区别:
- OC学习1——getter、setter、点语法