Commit 34aa3899 authored by banchichen's avatar banchichen

优化状态栏样式的配置

parent f5adc91e
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
UIView *_HUDContainer; UIView *_HUDContainer;
UIActivityIndicatorView *_HUDIndicatorView; UIActivityIndicatorView *_HUDIndicatorView;
UILabel *_HUDLable; UILabel *_HUDLable;
UIStatusBarStyle _originStatusBarStyle;
} }
@end @end
...@@ -33,8 +35,6 @@ ...@@ -33,8 +35,6 @@
self.view.backgroundColor = [UIColor whiteColor]; self.view.backgroundColor = [UIColor whiteColor];
self.navigationBar.barStyle = UIBarStyleBlack; self.navigationBar.barStyle = UIBarStyleBlack;
self.navigationBar.translucent = YES; self.navigationBar.translucent = YES;
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
[UIApplication sharedApplication].statusBarHidden = NO;
[TZImageManager manager].shouldFixOrientation = NO; [TZImageManager manager].shouldFixOrientation = NO;
// Default appearance, you can reset these after this method // Default appearance, you can reset these after this method
...@@ -60,6 +60,17 @@ ...@@ -60,6 +60,17 @@
[barItem setTitleTextAttributes:textAttrs forState:UIControlStateNormal]; [barItem setTitleTextAttributes:textAttrs forState:UIControlStateNormal];
} }
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
_originStatusBarStyle = [UIApplication sharedApplication].statusBarStyle;
[UIApplication sharedApplication].statusBarStyle = iOS7Later ? UIStatusBarStyleLightContent : UIStatusBarStyleBlackOpaque;
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[UIApplication sharedApplication].statusBarStyle = _originStatusBarStyle;
}
- (instancetype)initWithMaxImagesCount:(NSInteger)maxImagesCount delegate:(id<TZImagePickerControllerDelegate>)delegate { - (instancetype)initWithMaxImagesCount:(NSInteger)maxImagesCount delegate:(id<TZImagePickerControllerDelegate>)delegate {
TZAlbumPickerController *albumPickerVc = [[TZAlbumPickerController alloc] init]; TZAlbumPickerController *albumPickerVc = [[TZAlbumPickerController alloc] init];
self = [super initWithRootViewController:albumPickerVc]; self = [super initWithRootViewController:albumPickerVc];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment