Thursday, February 28, 2013

Moving from portrait view to Landscape view / Potrait UI orientation to landscape Ui orienttion in Phone iOS / Ui Orientation according to device Orientation / manually forcing orientation / change orientation manually


When u are switching from one view to another view .
First view is Portrait mode and next mode is in Landscape mode . 
Even u have implemented
-(BOOL)shouldAutorotate;
-(NSUInteger)supportedInterfaceOrientations;
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration;




USe 
+ (void)attemptRotationToDeviceOrientation

Attempts to rotate all windows to the orientation of the device.

-(void) viewDidAppear:(BOOL)animated
{
    [UIViewController attemptRotationToDeviceOrientation];
    [super viewDidAppear:animated];
}

No comments:

Post a Comment