开发者

Pre-drawing a UIView

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜