obj-c UIAlertView
来源:互联网 发布:融合网络 英文 编辑:程序博客网 时间:2024/03/29 09:00
#import <UIKit/UIKit.h>
@interface ViewController :UIViewController<UIAlertViewDelegate>
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex;
@end
- (void)viewDidLoad
{
[superviewDidLoad];
UIAlertView *view=[[UIAlertViewalloc] initWithTitle:@"标题"message:@"信息异常" delegate:self
cancelButtonTitle:@"取消"otherButtonTitles:@"确定",nil];
[view setAlertViewStyle:UIAlertViewStylePlainTextInput];
UITextField *textField=[view textFieldAtIndex:0];
textField.keyboardType=UIKeyboardTypeNamePhonePad;
[viewshow];
view =nil;
// Do any additional setup after loading the view, typically from a nib.
}
-(void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
UITextField *textField=[alertView textFieldAtIndex:0];
NSLog(@"输入的文字%@",textField.text);
if(buttonIndex==1)
{
NSLog(@"你点击的是第一个按钮");
}
else
{
NSLog(@"你点击的是第二个按钮");
}
}
- obj-c UIAlertView
- Obj-C & webservice
- Obj-C & webservice
- Predicate in Obj-C
- NSString in Obj-C
- Obj-C 基础概述
- iOS Obj-C
- win obj-c codeblocks
- obj-c 类别
- obj-c学习笔记
- Obj-c面向对象
- Obj-c内存管理
- obj-c strong weak
- obj-c NSClassFronString作用
- obj-c UIPickerView 使用
- obj-c UIDatePicker使用
- obj-c 读取文件 。
- Obj-C code
- JAVA 快速实现webService (同步逻辑)
- SQL语句(mysql为模板)
- 第一次程序设计作业
- 第二堂作业
- C# 无法从传输连接中读取数据: 远程主机强迫关闭了一个现有的连接。。
- obj-c UIAlertView
- The specified child already has a parent. You must call removeView() on the child's parent first
- 注册动态链接库(dll文件),提示找不到入口点
- IP定位
- 手机网站wap2.0版与html5触屏版有什么区别?
- 第二次程序设计上机报告
- Linux下shell脚本手动执行和放在crontab中自动执行的结果不一样
- HTTP协议之状态码详解
- 我的新浪博客