From 76165e82daee8b8c0b7f0488b05ba6a445ac64dc Mon Sep 17 00:00:00 2001 From: Brieuc Viel Date: Thu, 21 Dec 2017 14:22:15 +0100 Subject: [PATCH] [IphoneX] update temporary VideoCallUI for iphoneX --- Classes/CallView.m | 4 +++- Classes/PhoneMainView.h | 2 ++ Classes/PhoneMainView.m | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Classes/CallView.m b/Classes/CallView.m index 30f53101e..f67ce1c92 100644 --- a/Classes/CallView.m +++ b/Classes/CallView.m @@ -358,7 +358,9 @@ static void hideSpinner(LinphoneCall *call, void *user_data) { hideControlsTimer = nil; } - [PhoneMainView.instance fullScreen:!disabled]; + if(![PhoneMainView.instance isIphoneXDevice]){ + [PhoneMainView.instance fullScreen:!disabled]; + } [PhoneMainView.instance hideTabBar:!disabled]; if (!disabled) { diff --git a/Classes/PhoneMainView.h b/Classes/PhoneMainView.h index 3ac43c52a..4d3ad4783 100644 --- a/Classes/PhoneMainView.h +++ b/Classes/PhoneMainView.h @@ -106,4 +106,6 @@ - (void)updateApplicationBadgeNumber; + (PhoneMainView*) instance; +- (BOOL)isIphoneXDevice; + @end diff --git a/Classes/PhoneMainView.m b/Classes/PhoneMainView.m index 0f67e692f..52beba1ed 100644 --- a/Classes/PhoneMainView.m +++ b/Classes/PhoneMainView.m @@ -211,9 +211,13 @@ static RootViewManager *rootViewManagerInstance = nil; #define IS_IPHONE_X (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height == 812.0) #define IPHONE_STATUSBAR_HEIGHT (IS_IPHONE_X ? 35 : 20) +- (BOOL)isIphoneXDevice{ + return IS_IPHONE_X; +} + - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; - if(IS_IPHONE_X){ + if([self isIphoneXDevice]){ if(@available(iOS 11.0, *)) { [self childViewControllerForHomeIndicatorAutoHidden]; [self prefersHomeIndicatorAutoHidden];