سؤال

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?

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top