Cache painting on custom controls in IOS
I'm used to paint to an image in MacOS and paint that in drawRect: unless there is need to redra开发者_开发问答w. I do this because in some cases I get drawRect events from other controls like NSScrollView, or others I don't know about. I've noticed that doing a setNeedsDisplay in iOS is very expensive and also it looks like it doesn't get called unless I do it manually. To caché or not to caché in ios.. that is my question
精彩评论