When do a UIViews bounds get updated?
In the Apple documentation on the subject, they indicate that UIView bounds are automatically set when you initialize with a frame.
Are bounds automatically set at any other tim开发者_Go百科e? Specifically I've run into some weirdness with rotating back and forth from portrait mode and landscape. Do bounds get recalculated then? Any other times?
If you have an autoresizeMask
set on your view, then its bounds may change when its superview's bounds change. Other than that, I cannot think of any "automatic" bounds changes - only things like setting the frame or calling -sizeToFit
should change the bounds.
精彩评论