Tuesday, April 8, 2014

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];
}

0 comments:

Post a Comment

About

Powered by Blogger.