iOS8 UIAlertView键盘闪一下的问题
if (SYSTEM_VERSION >= 8.0) {
UIAlertController *alertCtrl = [UIAlertController alertControllerWithTitle:@"赎回成功" message:nil preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
[self.navigationController popViewControllerAnimated:YES];
}];
[alertCtrl addAction:okAction];
[self presentViewController:alertCtrl animated:YES completion:nil];
}else{
//这个else一定要写,否则会导致在ios8一下的真机crash
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"赎回成功" message:nil delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
alert.tag = ;
[alert show];
}
#pragma mark-UIAlertViewDelegate
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (alertView.tag == ) {
[self.navigationController popViewControllerAnimated:YES];
}
}
iOS 8 以后不用alertView了。使用UIAlertController代替。使用方法相同。
iOS8 UIAlertView键盘闪一下的问题的更多相关文章
- iOS8数字键盘加左下角完成button
iOS8数字键盘加左下角完成button的核心代码如下面: - (void)addDoneButtonToNumPadKeyboard { UIButton *doneButton = [UIButt ...
- ios8以后,使用UIAlertViw时pop/push页面后,键盘闪一下的问题
代码为 UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"" message:@"感谢你对我们提出的意见或 ...
- iOS8模拟器键盘弹不出来
command + k 或 command + shift + k 切换到模拟器键盘 其默认是Mac键盘
- 关于ios8模拟器不能输入中文问题以及软键盘不弹出问题
在Xcode菜单栏中 Product->scheme->Edit Scheme->Options->Application Region改为中国,就可以输入中文了, 如果软 ...
- UIAlertView、UIActionSheet兼容iOS8
链接地址:http://blog.csdn.net/nextstudio/article/details/39959895?utm_source=tuicool 1.前言 iOS8新增了UIAlert ...
- iOS 开发总结(下)
来源:蝴蝶之梦天使 链接:http://www.jianshu.com/p/d333cf6ae4b0 四十.AFNetworking 传送 form-data 将JSON的数据,转化为NSData, ...
- iOS开发经验总结(转)
在iOS开发中经常需要使用的或不常用的知识点的总结,几年的收藏和积累(踩过的坑). 一. iPhone Size 手机型号 屏幕尺寸 iPhone 4 4s 320 * 480 iPhone 5 5s ...
- iOS开发经验总结(下)
四十.AFNetworking 传送 form-data 将JSON的数据,转化为NSData, 放入Request的body中. 发送到服务器就是form-data格式. 四十一.非空判断注意 BO ...
- iOS开发经验相关知识
一. iPhone Size 手机型号 屏幕尺寸 iPhone 4 4s 320 * 480 iPhone 5 5s 320 * 568 iPhone 6 6s 375 * 667 iphone 6 ...
随机推荐
- vue--公告轮播
html: <div class="news" v-if="news.length > 0" > <ul class="m ...
- Vue生命周期,计算属性、方法、侦听器
vue实例和组件都有生命周期函数,beforeCreate()实例或组件没有被创建的时候执行的钩子函数:created()是实例或组件被创建完成的时候执行的钩子函 数:beforeMount()函数是 ...
- 支付宝支付Java代码
支付宝调用流程 开发前的准备工作 配置应用网关 应用网关里面填写的值就是商户后台的异步回调地址.也就是在支付宝付完款之后,由支付宝调用商户,便于商户验证订单各信息和更新订单状态 授权回调地址 授权回调 ...
- APP支付-》支付宝RSA2->支付与验签
第一次配置支付宝,按照官网示例搞了一天,走不通.经过两天的踩坑,百度了大神的代码,支付宝终于可以了. 1:下载这是官网的最新SDK 2:配置SDK,添加命名空间 AopClient.php文件: Si ...
- 微信小程序之富文本解析
亲身体验 wxparse 是个坑,弃之不用 微信小程序的 <rich-text>标签挺好用的 用法如下: 1.wxml页面 <rich-text nodes="{{node ...
- Handling Event
[Handling Event] 1.React events are named using camelCase 2.You must call preventDefault explicitly ...
- 问题:使用ajax跳转到新页面无效(浏览器Safari)
问题:使用ajax跳转到新页面无效(浏览器Safari) window.open("{% url "runtestinfo" %}") 但是使用loca ...
- Maven 标签
scope 1.compile:默认值 他表示被依赖项目需要参与当前项目的编译,还有后续的测试,运行周期也参与其中,是一个比较强的依赖.打包的时候通常需要包含进去 2.test:依赖项目仅仅参与测试相 ...
- PAT1021(dfs 连通分量)
A graph which is connected and acyclic can be considered a tree. The height of the tree depends on t ...
- http://www.rabbitmq.com/documentation.html
http://www.rabbitmq.com/documentation.html https://www.gitbook.com/book/geewu/rabbitmq-quick/details