开发者

Cache painting on custom controls in IOS

开发者 https://www.devze.com 2023-03-21 23:30 出处:网络
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 NSScro

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

0

精彩评论

暂无评论...
验证码 换一张
取 消