I am developing an application with orientation support for both portrait and landscape mode.
I was achieving this by changing view frame and assets size in
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{
self.view.frame = CGRectMake(0,0,1024,768);
}
Its working fine in ios4.3 and below.
When i tried to run in Xcode4.2 and ios5.0 simulator orientation is not clear. I mean when changed from portrait to landscape view is not fitting to screen (frame size is less than the actual landscape frame size).
Any idea why its happening?
Many Thanks,
Avi
apply frame when orientation change actually taken place xcode4.2 and iOS 5 have some fast respons for orientation change and other views and controls are improved so its not working for you so you will try it either in didRotateFromInterfaceOrientation or willRotateFromInterfaceOrientation it will works fine now.