I have a UIView with lots of image is drawn from drawRect when drawn finished, i wanna save(cache) all of image
How to save(cache) all of image in drawRect or something like that!
Thank everyone for looking this article.
I have a UIView with lots of image is drawn from drawRect when drawn finished, i wanna save(cache) all of image
How to save(cache) all of image in drawRect or something like that!
Thank everyone for looking this article.
If you cache blindly in the name of performance, it can have very negative performance costs. Caching isn't free -- use it judiciously in order to achieve the best balance of resources. Ideally, you would consider several other alternative approaches to determine which suits your exact needs best.
One quick/efficient approach would be CALayer.shouldRasterize
.