iOS.Performance-trick-presentViewController-is-so-slow-in-didSelectRowAtIndexPath
presentViewController is so slow in "tableView:didSelectRowAtIndexPath:"
Use Case: 在UITableView的delegate方法"tableView:didSelectRowAtIndexPath:"中调用
"[UIViewController presentViewController]"发现被显示的ViewController要有很长的延迟
才会显示出来。
修改后:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSInteger rowInSection = indexPath.row;
switch (rowInSection) {
case : // age
{
dispatch_async(dispatch_get_main_queue(), ^{
NSDate * nowDate = [NSDate date];
QZDatePickerViewController * datePickerViewController = [[QZDatePickerViewController alloc] initWithDate:nowDate];
datePickerViewController.delegate = self;
[self presentViewController:datePickerViewController
animated:NO
completion:nil];
});
}
break;
}
Reference
1. presentViewController:animated:YES view will not appear until user taps again
http://stackoverflow.com/questions/21075540/presentviewcontrolleranimatedyes-view-will-not-appear-until-user-taps-again
iOS.Performance-trick-presentViewController-is-so-slow-in-didSelectRowAtIndexPath的更多相关文章
- iOS pushViewController 和 presentViewController的区别 详解
pushViewController 导航控制器入栈的方式切换页面presentViewController 模态切换的方式切换页面 1:用 UINavigationController 的时候用 p ...
- Unity3D Optimizing Graphics Performance for iOS
原地址:http://blog.sina.com.cn/s/blog_72b936d801013ptr.html icense Comparisons http://unity3d.com/unity ...
- Why mobile web apps are slow
http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/ I’ve had an unusual number of interest ...
- iOS CoreAnimate
iOS CoreAnimate 东西比较多,这篇笔记是入门用的,主要讲述的是静态的图形绘画处理问题.(当然动画也只是一小部分)理解相关的概念问题: 参考资料 http://segmentfault ...
- 25个增强iOS应用程序性能的提示和技巧(高级篇)(2)
25个增强iOS应用程序性能的提示和技巧(高级篇)(2) 2013-04-16 14:56 破船之家 beyondvincent 字号:T | T 在开发iOS应用程序时,让程序具有良好的性能是非常关 ...
- iOS应用性能调优建议
本文来自iOS Tutorial Team 的 Marcelo Fabri,他是Movile的一名 iOS 程序员.这是他的个人网站:http://www.marcelofabri.com/,你还可以 ...
- iOS应用性能调优的25个建议和技巧
本文来自iOS Tutorial Team 的 Marcelo Fabri,他是Movile的一名 iOS 程序员.这是他的个人网站:http://www.marcelofabri.com/,你还可以 ...
- 25 个增强iOS应用程序性能的提示和技巧 应用程序性能的提示和技巧
初级 在开发过程中,下面这些初级技巧需要时刻注意: 1.使用ARC进行内存管理2.在适当的情况下使用reuseIdentifier3.尽可能将View设置为不透明(Opaque)4.避免臃肿的XIBs ...
- 复杂TableView在iOS上的性能优化
声明:本文翻译自<iOS performance optimization>,原文作者 Khang Vo.翻译本文纯属为了技术交流的目的,并不具有任何的商业性质,也不得利用本文内容进行商业 ...
随机推荐
- js中的三元运算符
<script type="text/javascript"> var b=5; (b == 5) ? a="true" : a="fal ...
- 1045 access denied for user 'root'@'localhost' using password yes的解决方法
今天把一个项目和项目的数据库都下载到了本地,安装好项目和在本地配置好数据库后,在浏览器登陆项目的后台却出现了以下错误: 后来上百度搜索了好几个答案,都是讲述修改数据库密码的步骤,但是就是没有说明为 ...
- java中获取接口(方法)中的参数名字(eclipse设置编译参数)(java8 javac -parameters)
interface接口参数 jdk1.7及以前使用spring功能实现的: 注意: 1.该功能只能获取类的方法的参数名,不能获取接口的方法的参数名. public static void test() ...
- Neural Network学习(二)Universal approximator :前向神经网络
1. 概述 前面我们已经介绍了最早的神经网络:感知机.感知机一个非常致命的缺点是由于它的线性结构,其只能做线性预测(甚至无法解决回归问题),这也是其在当时广为诟病的一个点. 虽然感知机无法解决非线性问 ...
- ASP.NET Misconfiguration: Debug Information
Abstract: Debugging messages help attackers learn about the system and plan a form of attack. Explan ...
- ActiveX: 如何用.inf和.ocx文件生成cab文件
ActiveX: 如何用.inf和.ocx文件生成cab文件
- MySQL连接线程kill利器之pt-kill
如何每10秒检查一次,杀死指定用户超过100秒的查询? pt-kill \ --no-version-check \ --host 127.0.0.1 --port 3306 --user 'xxxx ...
- 提高 ASP.NET Web 应用性能的 24 种方法和技巧
那性能问题到底该如何解决?以下是应用系统发布前,作为 .NET 开发人员需要检查的点. 1.debug=「false」 当创建 ASP.NET Web应用程序,默认设置为「true」.开发过程中,设置 ...
- 将复杂查询写到SQL配置文件--SOD框架的SQL-MAP技术简介
引言 今天看到一片热门的博客, .NET高级工程师面试题之SQL篇 ,要求找出每一个系的最高分,并且按系编号,学生编号升序排列.这个查询比较复杂,也比较典型,自从用了ORM后,很久没有写过SQL语句了 ...
- 解决SOAPCLIENT访问WebSerivce外网发布端口
猫用vs2010写了一个webservice,并写了一个盘点程序客户端,PDA盘点机用C#开发,笔记本用VFP开发,发布在本地局域网IIS服务器,用了两年一直很稳定.后面仓库搬迁,需要外网进行访问,在 ...