开发者

Pre-drawing a UIView

开发者 https://www.devze.com 2022-12-24 19:32 出处:网络
There is information that is only available after drawRect that I need to access when loading a UIView. Is there any way to do a \"pre-draw\" or offscreen in order to get this informat开发者_运维知识库

There is information that is only available after drawRect that I need to access when loading a UIView. Is there any way to do a "pre-draw" or offscreen in order to get this informat开发者_运维知识库ion earlier?


The answer to this question is depends very much on what kind of information you want to get from the view.

Anyway: You can draw the view’s underlying layer into your own graphics context using [myView.layer renderInContext:myCtx]. That’s in the QuartzCore.framework, CALayer.h.

0

精彩评论

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