views:

247

answers:

0

This ought to be brain-dead simple, but for some reason it's not.

I built an extremely simple test app. It just has a very simple subclass of UIViewController, whose view is a UITextView, which is loaded from a NIB. UITextView is a subclass of UIScrollView, so I would expect some fairly similar behavior.

My view controller overloads shouldAutorotateToInterfaceOrientation: to always return YES.

In my NIB, the UITextView has all springs and struts on, so it should resize to fit the current window.

But it doesn't. When the device orientation changes, the content of the UITextView doesn't change shape to go with it. It just gets clipped. I tried reaching inside the subviews of UITextView to tweak the autoresizeMask in didRotateFromInterfaceOrientation: but that didn't help. Becoming increasingly desperate for some cooperation, I tried mangling the contentSize, contentOffset, and contentInset properties of the UITextView there as well, to no avail.

I have a feeling I'm either missing something obvious, or else UITextView is buggy. Anybody have any insight into this?