Reputation: 5
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.
Upvotes: 0
Views: 58
Reputation: 280
Go to Project-> TARGET-> General In Deployment Info select iPhone/iPad. Checkmark for desired Device Orientations.
Upvotes: 0
Reputation: 4046
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..
Upvotes: 0
Reputation: 12538
Select the project
and then go to the General Tab
. There you can see the section Deployment Info
with the option Device Orientation
. Unselect all the orientations you don't need.
Upvotes: 0
Reputation: 12023
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.
Upvotes: 1
Reputation: 462
In your "Deployment Info" go to "summary" there are "supprted device orientation" , you can set the device orientation.
Upvotes: 0
Reputation: 21912
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.
Upvotes: 0