开发者

When do a UIViews bounds get updated?

开发者 https://www.devze.com 2023-01-30 03:04 出处:网络
In the Apple documentation on the subject, they indicate that UIView bounds are automatically set when you initialize with a frame.

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.

0

精彩评论

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