美文网首页
runloop 的 run 方法

runloop 的 run 方法

作者: 百思不得Ting姐 | 来源:发表于2017-05-23 17:17 被阅读0次

好久没用过runloop那些东西,好多东西都忘了

run方法开启一个无限循环,在这个循环里监听和处理消息,相当于:

while(1) {

[runloop runMode:beforeDate:]

}

文档一句话:

otherwise, it runs the receiver in theNSDefaultRunLoopMode by repeatedly invokingrunMode:beforeDate:.

所以,当使用run方法的时候,不需要再写for或者while循环,使用runMode:beforeDate:的时候需要。

相关文章

  • runloop 的 run 方法

    好久没用过runloop那些东西,好多东西都忘了 run方法开启一个无限循环,在这个循环里监听和处理消息,相当于:...

  • RunLoop 的坑

    由于项目中, 使用 runLoop.run()方法, 当执行 remove port 和CFRunLoopStop...

  • runloop 面试题

    runloop 面试题 基于最近的几次面试,整理了runloop 的相关知识 1、Runloop 是什么?Run ...

  • NSRunLoop

    【iOS程序启动与运转】- RunLoop个人小结 RunLoop总结:RunLoop的应用场景(三) 走进Run...

  • [翻译] Run, RunLoop, Run!

    注:这篇文章翻译自 http://bou.io/RunRunLoopRun.html ,仅供学习参考,谢绝转载,已...

  • 09--Runloop01--runloop 文档解读

    runloop 官网 Introduction to Run Loops image 很有意思的是,runloop...

  • RunLoop

    RunLoop 文章已经很多了,结合各大文章做个总结 什么是 RunLoop RunLoop 人如其名,run 跑...

  • iOS RunLoop小结

    原文链接:http://yupeng.fun/2019/05/30/runloop/ RunLoop 简介 Run...

  • 备战2020——iOS面试题汇总!(栏目将持续更新)

    runloop 推荐相关文章 iOS 对于Run Loop的理解? 2019 iOS面试题-----RunLoop...

  • runloop

    runloop概念 Run loops are part of the fundamental infrastru...

网友评论

      本文标题:runloop 的 run 方法

      本文链接:https://www.haomeiwen.com/subject/slrgxxtx.html