Safe way to render UIVIew to an image on background thread?

后端 未结 1 720
生来不讨喜
生来不讨喜 2020-12-10 14:40

I\'m creating small tile images to be stored on disk and displayed to the user. Here is my current process for doing this:

  1. Create a viewcontroller that represe
相关标签:
1条回答
  • 2020-12-10 15:19

    I've never tried what you described, and I don't like being the bearer of bad news, but taken from Apple's documentation.

    Note: For the most part, UIKit classes should be used only from an application’s main thread. This is particularly true for classes derived from UIResponder or that involve manipulating your application’s user interface in any way.

    Of course, they conveniently say "For the most part", so that leaves some wiggle room.

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