I have a app which i want to display in portrait mode. But I only want to show one view in both modes.
I have do this for iOS5 . But in iOS6,i can't able to do this.
I also tried many codes to solved it.
How can I solve this problem?
I have a app which i want to display in portrait mode. But I only want to show one view in both modes.
I have do this for iOS5 . But in iOS6,i can't able to do this.
I also tried many codes to solved it.
How can I solve this problem?
apple has changed orientation in ios 6 .
in short use following steps:
1) set supported orientations in Targets->Summary...
2)In iOS6.0
shouldAutorotateToInterfaceOrientation
Method is deprecated.So,instead of this method we have to useshouldAutorotate
Method.
- (BOOL)shouldAutorotate
{
return NO;
}
3) in method
supportedInterfaceOrientations
we have to set which orientations we want likeUIInterfaceOrientationMaskAll
if we want all orientations
- (NSUInteger)supportedInterfaceOrientations
{
return (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown );
}