File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -490,7 +490,7 @@ model 主要是用来指定事件在运行循环中的优先级的,分为:
490490
491491###30 . 以+ scheduledTimerWithTimeInterval...的方式触发的timer,在滑动页面上的列表时,timer会暂定回调,为什么?如何解决?
492492
493- RunLoop只能运行在一种mode下,如果要换mode,当前的loop也需要停下重启成新的。利用这个机制,ScrollView滚动过程中NSDefaultRunLoopMode(kCFRunLoopDefaultMode)的mode会切换到UITrackingRunLoopMode来保证ScrollView的流畅滑动:只能在NSDefaultRunLoopMode模式下处理的事件会影响scrllView的滑动 。
493+ RunLoop只能运行在一种mode下,如果要换mode,当前的loop也需要停下重启成新的。利用这个机制,ScrollView滚动过程中NSDefaultRunLoopMode(kCFRunLoopDefaultMode)的mode会切换到UITrackingRunLoopMode来保证ScrollView的流畅滑动:只能在NSDefaultRunLoopMode模式下处理的事件会影响ScrollView的滑动 。
494494
495495如果我们把一个NSTimer对象以NSDefaultRunLoopMode(kCFRunLoopDefaultMode)添加到主运行循环中的时候,
496496ScrollView滚动过程中会因为mode的切换,而导致NSTimer将不再被调度。
@@ -956,4 +956,4 @@ KVO 在实现中通过 ` isa 混写(isa-swizzling)` 把这个对象的 isa
956956
957957
958958Posted by [ 微博@iOS 程序犭袁] ( http://weibo.com/luohanchenyilong/ )
959- 原创文章,版权声明:自由转载-非商用-非衍生-保持署名 | [ Creative Commons BY-NC-ND 3.0] ( http://creativecommons.org/licenses/by-nc-nd/3.0/deed.zh )
959+ 原创文章,版权声明:自由转载-非商用-非衍生-保持署名 | [ Creative Commons BY-NC-ND 3.0] ( http://creativecommons.org/licenses/by-nc-nd/3.0/deed.zh )
You can’t perform that action at this time.
0 commit comments