I made an iPad application in which I want to support orientation, so I’ve written this code:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
//return YES;
return (interfaceOrientation==UIInterfaceOrientationPortrait||interfaceOrientation==UIInterfaceOrientationLandscapeLeft||interfaceOrientation==UIInterfaceOrientationLandscapeRight);
}
I’ve created a few tables in portrait mode, so when I rotate my app, the tables still comes according to portrait mode only, but the table inside my view doesn’t autoresize.
You need to make sure the table view itself is set to expand and contract in both directions when autoresized – this is easiest set in IB by clicking on the table view, then clicking on the ruler sidebar header tab, then making sure that all of the autoresizing options are turned on – resizes both directions, sticks to all corners.