Question

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 time? 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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top