Is UIGraphicsBeginImageContext thread safe?

前端 未结 2 2108
攒了一身酷
攒了一身酷 2020-12-01 20:43

So I\'ve been under the impression that UIGraphicsBeginImageContext is thread safe, and can be called from any thread to create a new CGContextRef that can be used to draw.

相关标签:
2条回答
  • 2020-12-01 20:53

    To quote from the documentation:

    In iOS 4 and later, you may call this function from any thread of your app.

    link:http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIKitFunctionReference/Reference/reference.html

    0 讨论(0)
  • 2020-12-01 21:11

    UIGraphicsBeginImageContext definitely is thread safe in iOS 4 and later. WWDC 2012 session videos relate to iOS 6, so maybe you should relate to iOS 6 documentation as well :)

    0 讨论(0)
提交回复
热议问题