iOS之提示框的道道
来源:互联网 发布:淘宝新店查询软件 编辑:程序博客网 时间:2024/04/28 21:59
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
//创建提示框控制器选择样式决定出现在中间还是下面
UIAlertController *alertVC = [UIAlertControlleralertControllerWithTitle:@"你说什么"message:nilpreferredStyle:UIAlertControllerStyleAlert];
//创建提示按钮
UIAlertAction *actiona = [UIAlertActionactionWithTitle:@"我说你傻"style:UIAlertActionStyleCancelhandler:nil];
//把提示按钮添加到控制器里
[alertVC addAction:actiona];
//给提示框加入键盘输入框
//显示在底部 不支持输入框
[alertVC addTextFieldWithConfigurationHandler:^(UITextField *_Nonnull textField) {
[textField addTarget:selfaction:@selector(ffff:)forControlEvents:UIControlEventEditingChanged];
}];
//控制器跳转方法 present对应dismiss
[selfpresentViewController:alertVCanimated:YEScompletion:nil];
}
//键盘响应方法
-(void)ffff:(UITextField *)sender{
NSLog(@"%@",sender.text);
}
- iOS之提示框的道道
- 人弃我取的道道 撿钱包投资哲学之二
- “拿来主义”里面的道道
- IOS之提示框
- 重新设计的道道指令
- HashMap和Map的道道
- 道道通地图做的还不错
- 关于opengl混合的一些道道
- 四道道经典的笔试题
- iOS提示框之 MBProgressHUD 与 SVProgressHUD
- iOS开发笔记之渐隐提示框
- typedef和结构体的定义之间的道道
- 关于sql server复制的一些小道道
- 聊聊C语言那些堆和栈的道道
- IOS学习之提示框第三方库之MBProgressHUD
- iOS开发之自己封装的提示框(警告框)样式BHAlertView
- 道道道
- 道道道
- 专题三 Problem N
- Tomcat7后的servlet不再需要配置web.xml了
- Mysql 语句执行顺序
- JPA 自关联
- iptables详解
- iOS之提示框的道道
- iTunesconnect 缺失Beta版权利
- ucwords.php
- C++实验5-项目1
- 第十一周项目实践1————点类设计
- python学习要点
- 动态规划-走楼梯
- JAVA自定义注解(小例子)
- hdu 5675 ztr loves math