开发者

Is it ok to change userInteractionEnabled property in another thread?

开发者 https://www.devze.com 2023-02-27 03:53 出处:网络
This might be a noob question, but I want to change the userInteractionEnabled property of开发者_开发技巧 a view in a thread that is not the main thread, is this safe to do?Any interaction with UIKit

This might be a noob question, but I want to change the userInteractionEnabled property of开发者_开发技巧 a view in a thread that is not the main thread, is this safe to do?


Any interaction with UIKit should be done in the main thread. That includes interaction with a UIView.

CORRECTION:

Some interactions with UIKIt are permissible in the main thread. UIImage, UIColor, UIFont and Core Graphics are all threadsafe.

0

精彩评论

暂无评论...
验证码 换一张
取 消