mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Don't perform statusbar animation if target is already in the expected state.
This commit is contained in:
parent
a31ee8b410
commit
1c1fcd6553
1 changed files with 11 additions and 7 deletions
|
|
@ -433,16 +433,20 @@ static PhoneMainView* phoneMainViewInstance=nil;
|
|||
// black bg: white text on black background
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
|
||||
|
||||
statusBarBG.alpha = 0;
|
||||
statusBarBG.hidden = NO;
|
||||
[UIView animateWithDuration:0.3f
|
||||
animations:^{statusBarBG.alpha = 1;} ];
|
||||
if(statusBarBG.hidden == YES){
|
||||
statusBarBG.alpha = 0;
|
||||
statusBarBG.hidden = NO;
|
||||
[UIView animateWithDuration:0.3f
|
||||
animations:^{statusBarBG.alpha = 1;} ];
|
||||
}
|
||||
} else if(!fromLightStatus && toLightStatus) {
|
||||
// light bg: black text on white bg
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
|
||||
[UIView animateWithDuration:0.3f
|
||||
animations:^{ statusBarBG.alpha = 0; }
|
||||
completion:^(BOOL finished) {statusBarBG.hidden = YES;}];
|
||||
if( statusBarBG.hidden == NO ){
|
||||
[UIView animateWithDuration:0.3f
|
||||
animations:^{ statusBarBG.alpha = 0; }
|
||||
completion:^(BOOL finished) {statusBarBG.hidden = YES;}];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue