摘要: iPhone应用开发中关于NSRunLoop的概述是本文要介绍的内容,NSRunLoop是一种更加高明的消息处理模式,他就高明在对消息处理过程进行了更好的抽象和封装,这样才能是的你不用处理一些很琐碎很低层次的具体消息的处理,在NSRunLoop中每一个消息就被打包在input source或者是ti 阅读全文
posted @ 2016-12-30 17:32 简进祥 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 例子: CADisplayLink* gameTimer; CADisplayLink* gameTimer; gameTimer = [CADisplayLink displayLinkWithTarget:self selector:@selector(updateDisplay:)]; [ga 阅读全文
posted @ 2016-12-30 15:29 简进祥 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 简单的说run loop是事件驱动的一个大循环,如下代码所示int main(int argc, char * argv[]) { //程序一直运行状态 while (AppIsRunning) { //睡眠状态,等待唤醒事件 id whoWakesMe = SleepForWakingUp(); 阅读全文
posted @ 2016-12-30 15:23 简进祥 阅读(234) 评论(0) 推荐(0) 编辑