|
@@ -1,4 +1,5 @@
|
1
|
1
|
#import "RNNStatusBarOptions.h"
|
|
2
|
+#define kStatusBarAnimationDuration 0.35
|
2
|
3
|
|
3
|
4
|
@implementation RNNStatusBarOptions
|
4
|
5
|
|
|
@@ -19,9 +20,15 @@
|
19
|
20
|
}
|
20
|
21
|
}
|
21
|
22
|
|
22
|
|
- if (self.style) {
|
23
|
|
- [viewController setNeedsStatusBarAppearanceUpdate];
|
|
23
|
+ if (self.style || self.hidden) {
|
|
24
|
+ [UIView animateWithDuration:[self statusBarAnimationDuration] animations:^{
|
|
25
|
+ [viewController setNeedsStatusBarAppearanceUpdate];
|
|
26
|
+ }];
|
24
|
27
|
}
|
25
|
28
|
}
|
26
|
29
|
|
|
30
|
+- (CGFloat)statusBarAnimationDuration {
|
|
31
|
+ return [self.animate boolValue] ? kStatusBarAnimationDuration : CGFLOAT_MIN;
|
|
32
|
+}
|
|
33
|
+
|
27
|
34
|
@end
|