开发者

UIView draw in subview

开发者 https://www.devze.com 2023-02-14 14:02 出处:网络
Is it possible for a container UIView to draw in a child UIView? If s开发者_Go百科o, how do I obtain the child\'s cgcontext?It is possible, add an accessor to the clild view\'s context.

Is it possible for a container UIView to draw in a child UIView? If s开发者_Go百科o, how do I obtain the child's cgcontext?


It is possible, add an accessor to the clild view's context.

Just because it is possible doesn't mean that this is recommended. In fact it is a really bad idea. A better is to ask the subview to change the way it is drawing. Set an accessor for an instance variable, or set a new state that will change the drawing.

0

精彩评论

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