i am working with the application and want to stop the rotation when i move the device to landscape mode. Please help me out regarding this. Your help will be much appriciable.
Auto rotation or the views
86 Views Asked by Sahil At
6
There are 6 best solutions below
0
On
If you don't want to support landscape orientation, in Xcode, select your project in the Navigator, then go to Deployment info and uncheck Landscape left and right.
0
On
In your "Deployment Info" go to "summary" there are "supprted device orientation" , you can set the device orientation.
0
On
just click on your project and click on General Tab and go to Deployment Info section
and unselect the Landscape Left and Landscape Right option.



0
On
As above is one way to set portrait apps ....
but another way throughout coding like u set particular view portrait...
add this method in your view controller.
- (BOOL)shouldAutorotate;
{
return YES;
}
- (NSUInteger)supportedInterfaceOrientations;
{
return UIInterfaceOrientationMaskPortrait ;
}
u can also set the multiple value like ..
- (NSUInteger)supportedInterfaceOrientations;
{
return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;
}
it is useful for the different view set different orientation ..
Best of luck..
Select the projectand then go to theGeneral Tab. There you can see the sectionDeployment Infowith the optionDevice Orientation. Unselect all the orientations you don't need.