Search code examples
objective-cxcodeuiinterfaceorientationios5

iOS UIInterfaceOrientation not working with iOS 5


when i use the UIInterfaceOrientation at any device of iOS 4 its work perfect but when use it in iOS 5 its not like iOS 4

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
   return (interfaceOrientation == UIInterfaceOrientationPortrait || 
   interfaceOrientation==UIInterfaceOrientationPortraitUpsideDown);
}

any idea


Solution

  • Did you send:

     [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]
    

    in your app delegate? If not match it with and "end..." message - google these methods for more information