Converting an UIview unto UIimage causing memory leak

前端 未结 2 763
梦如初夏
梦如初夏 2021-02-06 16:40

I\'m developing an app for iPhone using a coverFlow view, when the app is building the cards it is using a UIView in order to add labels and other stuff. Then I convert the UIV

2条回答
  •  南方客
    南方客 (楼主)
    2021-02-06 17:11

    Use drawViewHierarchyInRect:afterScreenUpdates: instead of renderInContext: it is 15x faster.

    You can see the comparison on this article.

    Also, I have created a Swift extension for doing this: https://stackoverflow.com/a/32042439/517707

提交回复
热议问题