iphone - Why are the bounds of an UIView a CGRect and not a CGSize? -
is there reason why bounds property of uiview
(an nsview
) cgrect
when information you'll ever want in property size of cgrect
.
is shortcut drawing since you'll need cgrect
when drawing? or specific special case origin
of bounds
else {0, 0}
?
the frame
specifies view relative superview, while bounds
specifies view allowed draw relative frame.
by changing bounds
origin and/or width can clipping, e.g., or drawing outside of view.
i.e, bounds origin (0,0) must not so, when clipping.
furthermore, bounds
used affine transformations instead of frame
, represents position after transformation have origin different (0,0);
Comments
Post a Comment