MCSwipeTableViewCell icon indicating copy to clipboard operation
MCSwipeTableViewCell copied to clipboard

Change renderInContext to drawViewHierarchyInRect in imageWithView

Open frapsMatheus opened this issue 8 years ago • 0 comments

Change [view.layer renderInContext:UIGraphicsGetCurrentContext()];

To: [view drawViewHierarchyInRect:view.bounds afterScreenUpdates:YES];

It runs much faster. From my tests on my app it went from 0.625468s to 0.014225.

Heres is a better explanation on possible choices and it has a link to why it is better: http://stackoverflow.com/questions/19066717/how-to-render-view-into-image-faster

frapsMatheus avatar Apr 06 '16 15:04 frapsMatheus