mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
fix status bar height in call view for iphoneX, XR and XS
This commit is contained in:
parent
b2513d760a
commit
60fba52521
3 changed files with 7 additions and 6 deletions
|
|
@ -392,10 +392,6 @@
|
|||
return UIInterfaceOrientationPortrait;
|
||||
}
|
||||
|
||||
#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
|
||||
#define IS_IPHONE_X (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height >= 812.0)
|
||||
#define IPHONE_STATUSBAR_HEIGHT (IS_IPHONE_X ? 35 : 20)
|
||||
|
||||
- (void)update:(UICompositeViewDescription *)description
|
||||
tabBar:(NSNumber *)tabBar
|
||||
statusBar:(NSNumber *)statusBar
|
||||
|
|
@ -577,7 +573,7 @@
|
|||
|
||||
// Compute frame for each elements
|
||||
CGRect viewFrame = self.view.frame;
|
||||
int origin = currentViewDescription.fullscreen ? 0 : IPHONE_STATUSBAR_HEIGHT;
|
||||
int origin = currentViewDescription.fullscreen ? 0 : [PhoneMainView iphoneStatusBarHeight];
|
||||
|
||||
|
||||
// 1. status bar - fixed size on top
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@
|
|||
+ (PhoneMainView*) instance;
|
||||
|
||||
- (BOOL)isIphoneXDevice;
|
||||
+ (int)iphoneStatusBarHeight;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
|||
|
|
@ -208,13 +208,17 @@ static RootViewManager *rootViewManagerInstance = nil;
|
|||
|
||||
/* IPHONE X specific : hide the HomeIndcator when not used */
|
||||
#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
|
||||
#define IS_IPHONE_X (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height == 812.0)
|
||||
#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;
|
||||
}
|
||||
|
||||
+ (int)iphoneStatusBarHeight{
|
||||
return IPHONE_STATUSBAR_HEIGHT;
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
if([self isIphoneXDevice]){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue