mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
fix landscape view of camera
This commit is contained in:
parent
1a766237f6
commit
fdea674773
2 changed files with 29 additions and 0 deletions
|
|
@ -43,6 +43,20 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (BOOL) shouldAutorotate{
|
||||
return NO;
|
||||
}
|
||||
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000
|
||||
- (NSUInteger)supportedInterfaceOrientations {
|
||||
return UIInterfaceOrientationMaskPortrait;
|
||||
}
|
||||
#else
|
||||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations{
|
||||
return UIInterfaceOrientationMaskPortrait;
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma mark - UICompositeViewDelegate Functions
|
||||
|
||||
static UICompositeViewDescription *compositeDescription = nil;
|
||||
|
|
@ -93,6 +107,10 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
setStatusBarStyle:UIStatusBarStyleDefault]; // Fix UIImagePickerController status bar style change
|
||||
|
||||
[PhoneMainView.instance hideStatusBar:YES];
|
||||
|
||||
//Prevent rotation of camera
|
||||
NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationPortrait];
|
||||
[[UIDevice currentDevice] setValue:value forKey:@"orientation"];
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
|
|
|
|||
|
|
@ -740,4 +740,15 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
|
|||
[LinphoneManager.instance startLinphoneCore];
|
||||
}
|
||||
|
||||
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
|
||||
if ([[(PhoneMainView*)self.window.rootViewController currentView] equal:ImagePickerView.compositeViewDescription])
|
||||
{
|
||||
//Prevent rotation of camera
|
||||
NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationPortrait];
|
||||
[[UIDevice currentDevice] setValue:value forKey:@"orientation"];
|
||||
return UIInterfaceOrientationMaskPortrait;
|
||||
}
|
||||
else return UIInterfaceOrientationMaskAll;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue