mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 08:39:20 +00:00
Fix status bar color when going to/coming from dialer on ipad
This commit is contained in:
parent
c14c889b47
commit
bcfd661408
3 changed files with 21 additions and 7 deletions
|
|
@ -145,12 +145,7 @@
|
|||
[self processRemoteNotification:remoteNotif];
|
||||
}
|
||||
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000
|
||||
// fix status bar color in iOS7
|
||||
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
|
||||
[application setStatusBarStyle:UIStatusBarStyleLightContent];
|
||||
}
|
||||
#endif
|
||||
[[PhoneMainView instance] updateStatusBar:nil];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@
|
|||
- (void)showStateBar:(BOOL)show;
|
||||
- (void)showTabBar:(BOOL)show;
|
||||
- (void)fullScreen:(BOOL)enabled;
|
||||
- (void)updateStatusBar:(UICompositeViewDescription*)to_view;
|
||||
- (void)startUp;
|
||||
|
||||
- (void)addInhibitedEvent:(id)event;
|
||||
|
|
|
|||
|
|
@ -413,6 +413,23 @@ static PhoneMainView* phoneMainViewInstance=nil;
|
|||
[mainViewController setStateBarHidden:!show];
|
||||
}
|
||||
|
||||
- (void)updateStatusBar:(UICompositeViewDescription*)to_view {
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000
|
||||
if ([LinphoneManager runningOnIpad]) {
|
||||
// In iOS7, the ipad has a black background on dialer, so we have to adjust the
|
||||
// status bar style for each transition to/from this view
|
||||
BOOL toLightStatus = [to_view equal:[DialerViewController compositeViewDescription]];
|
||||
BOOL fromLightStatus = [currentView equal:[DialerViewController compositeViewDescription]];
|
||||
if( (!to_view && fromLightStatus) || // this case happens at app launch
|
||||
toLightStatus )
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
|
||||
else if(fromLightStatus)
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
- (void)fullScreen:(BOOL)enabled {
|
||||
[mainViewController setFullScreen:enabled];
|
||||
}
|
||||
|
|
@ -442,9 +459,10 @@ static PhoneMainView* phoneMainViewInstance=nil;
|
|||
} else {
|
||||
[mainViewController setViewTransition:nil];
|
||||
}
|
||||
[self updateStatusBar:view];
|
||||
[mainViewController changeView:view];
|
||||
currentView = view;
|
||||
}
|
||||
}
|
||||
|
||||
NSDictionary* mdict = [NSMutableDictionary dictionaryWithObject:currentView forKey:@"view"];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneMainViewChange object:self userInfo:mdict];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue