模拟iOS系统原生导航条隐藏或显示动画
借UIView动画,使更改导航条的hidden属性这一过程动起来。悦德财富:https://yuedecaifu.com
代码
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
[UIView beginAnimations:nil context:nil];[UIView setAnimationDelegate:self];[UIView setAnimationDidStopSelector:@selector(didAfterHidden)];[UIView setAnimationDuration:2.3];[view setAlpha:0.0f];[UIView commitAnimations];[UIView animateWithDuration:0.35 delay:0 options:(UIViewAnimationCurveEaseOut) animations:^{ navigationBar_.alpha = 0.; } completion:^(BOOL finished){ navigationBar_.hidden = YES; navigationBar_.alpha = alpha; }]; |
浙公网安备 33010602011771号