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 ...
随机推荐
- spark 学习_rdd常用操作
[spark API 函数讲解 详细 ]https://www.iteblog.com/archives/1399#reduceByKey [重要API接口,全面 ] http://spark.apa ...
- HBuilder在MAC下的SVN
1. 安装svn插件,工具--插件安装---svn--安装 2. 使用svn,文件---导入---从svn检出项目 -- 下一步 3. 创建新的资源库位置--下一步-- URL(输入svn仓库地址)- ...
- linux下安装zabbix服务器
1.lnmp环境安装(linux.nginx.mysql.php) 2.安装php所需模块以及其他模块 yum install -y php-bcmath yum install -y php-mbs ...
- 【C++】Mandelbrot集绘制(生成ppm文件)
曼德勃罗特集是人类有史以来做出的最奇异,最瑰丽的几何图形.曾被称为"上帝的指纹". 这个点集均出自公式:Zn+1=(Zn)^2+C.(此处Z.C均为复数)所有使得该公式无限迭代后的 ...
- Vue-axios快速上手(转)
引入方式: 1 2 3 4 5 $ npm install axios $ cnpm install axios //taobao源 $ bower install axios 或者使用cdn: &l ...
- JavaScript中判断null、undefined与NaN的方法
1.判断undefined: ? 1 2 3 4 var tmp = undefined; if (typeof(tmp) == "undefined"){ alert(" ...
- BeautifulSoup中查找元素 select() 和find()区别
从html中查找元素,之前一般都用find(),查找符合条件的第一个,如下 f = open(file, 'r') # 读取文件内容content = f.read()soup= BeautifulS ...
- 用两个栈实现队列(python)
题目描述 用两个栈来实现一个队列,完成队列的Push和Pop操作. 队列中的元素为int类型. # -*- coding:utf-8 -*- class Solution: def __init__( ...
- TZOJ 1594 Optimal Milking(二分+最大流)
描述 FJ has moved his K (1 <= K <= 30) milking machines out into the cow pastures among the C (1 ...
- 封装JedisClient.提供API实现对redis的操作
需要导包,jedis-2.8.1.jar和博主的序列化工具类SerializeUtils package com.demo.redis; import java.util.ArrayList; imp ...