Search code examples
iphoneinterface-orientation

How to rotate from portrait to landscape?


How to rotate from portrait to landscape? What would I have to implement? And what must I do that my views resize to the new width?


Solution

  • The below method "return yes" will make orientation change if it is "return NO" the orientation will not change.

    - (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) orientation 
    {
    
     return YES;
    
    }
    

    All the best.