See the Autoresizing Behaviors section on the Windows and Views conceptual guide on Apple's site. That explains how to achieve automatic rotation from portrait to landscape and back again without using Interface Builder and without having to deal with manually implementing complex transforms.
As for rotating your custom content and disabling scrolling, see shouldAutorotateToInterfaceOrientation:interfaceOrientation
, willRotateToInterfaceOrientation:duration:
, and didRotateFromInterfaceOrientation:
in UIViewController
. You can implement these methods to intercept rotation events, check which orientation you are moving to, and take care of your custom drawing and properties setting stuff there.
Edit
In response to your comment, I found this bit from the Table View Programming Guide from Apple:
UITableView inherits from
UIScrollView, which defines scrolling
behavior for views with content larger
than the size of the window.
UITableView redefines the scrolling
behavior to allow vertical scrolling
only.
Perhaps Apple has deemed horizontal scrolling of table views to be against their human interface guidelines. I wonder if you could re-re-define the scrolling behavior if you subclassed UITableView
, but that would probably be a ton of trial and error work. If you are actually able to accomplish this, I'm sure many people here would be interested in how you did it. I searched around for a while trying to find other people's solutions, but I couldn't find anything out there.
Then again, Apple may not allow your app into the app store if you did this, assuming it really does break the HIG.