UIView draw in subview
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.
精彩评论