Adding Pinch/Zoom effect to a UIImageView inside a UIScrollView

落爺英雄遲暮 提交于 2019-12-05 20:39:08
Chandan Shetty SP

If you are using NSDefaultRunLoopMode, UIAPPlication adds a run loop mode UITrackingRunLoopMode for tracking scrollview events like scrolling. Since the UIApplication switches from NSDefaultRunLoopMode to UITrackingRunLoopMode any events on NSDefaultRunLoopMode will not be called until UIAPPlication switch back to NSDefaultRunLoopMode.

It might be the problem, the fix is change NSDefaultRunLoopMode to NSRunLoopCommonModes .

If you are not sure whether you are using runloop or not as you mentioned in comment. Just search NSDefaultRunLoopMode in your project.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!