mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-06 21:33:08 +00:00
disable upside down orientation
This commit is contained in:
parent
18c1b67714
commit
23c18dc5e0
3 changed files with 7 additions and 3 deletions
|
|
@ -830,7 +830,7 @@ didInvalidatePushTokenForType:(NSString *)type {
|
|||
[[UIDevice currentDevice] setValue:value forKey:@"orientation"];
|
||||
return UIInterfaceOrientationMaskPortrait;
|
||||
}
|
||||
else return UIInterfaceOrientationMaskAll;
|
||||
else return UIInterfaceOrientationMaskAllButUpsideDown;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -256,6 +256,9 @@ static RootViewManager *rootViewManagerInstance = nil;
|
|||
|
||||
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
|
||||
duration:(NSTimeInterval)duration {
|
||||
if (toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown)
|
||||
return;
|
||||
|
||||
[super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
|
||||
[mainViewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
|
||||
[self orientationUpdate:toInterfaceOrientation];
|
||||
|
|
@ -263,6 +266,9 @@ static RootViewManager *rootViewManagerInstance = nil;
|
|||
|
||||
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
|
||||
duration:(NSTimeInterval)duration {
|
||||
if (toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown)
|
||||
return;
|
||||
|
||||
[super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
|
||||
[mainViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,13 +103,11 @@
|
|||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue