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 ...
随机推荐
- 八皇后问题-dfs
一.题意解析 国际象棋中的皇后,可以横向.纵向.斜向移动.如何在一个8X8的棋盘上放置8个皇后,使得任意两个皇后都不在同一条横线.竖线.斜线方向上?八皇后问题是一个古老的问题,于1848年由一位国际象 ...
- 给RabbitMQ发送消息时,设置请求头Header。
消费者的请求头 生产者设置请求头 由于消费者那里,@Payload是接受的消息体,使用了@Header注解,需要请求头,生产者这边就要设置请求头,然后rabbitTemplate再调用convertA ...
- bootstrap 固定表头
1 htmL <!DOCTYPE html> <html> <head> <title>Fixed Columns</title> < ...
- Git 分支 - 分支管理
1 查看每一个分支 git branch 2 查看每一个分支的最后一次提交 git branch -v 3 创建分支 (1)只创建本地分支:git branch <branchname> ...
- win静态库动态库
静态链接库: #include "..\lib.h" #pragma comment(lib,"..\\debug\\libTest.lib") //指定与静态 ...
- echarts折线图Demo
echarts链接:http://echarts.baidu.com/examples/editor.html?c=line-stack 黑底代码:http://gallery.echartsjs.c ...
- select-options and range
1.SELECT...WHERE ... IN ...,它后面跟着的是一个RANGE类型的内表,这种内表是通过RANGES或者SELECT-OPTIONS来定义的. 2.内表中包含四个字段:SIGN, ...
- Jquery的Ajax中contentType和dataType的区别
$.ajax({ type: httpMethod, cache:false, async:false, contentType: "application/json; charset=ut ...
- SI和DI
si和di是8086CPU中和bx功能相近的寄存器,si和di不能够分成两个8位寄存器来使用. 用si和di实现将字符串"welcome to masm!"复制到它后面的数据区中. ...
- python requests的content和text方法的区别(转)
原文地址: http://blog.csdn.net/xie_0723/article/details/51361006 问题: 一直在想requests的content和text属性的区别,从pri ...