Improve and fix adjusting status bar style

- Only adjust the status bar style, if the navigation bar style is the default one
- Fix a bug not resetting the status bar style correctly when presenting the update view in a navigation bar stack
This commit is contained in:
Andreas Linde
2013-02-17 19:08:44 +01:00
parent b792ee9ccd
commit abc639c18c
2 changed files with 7 additions and 6 deletions

View File

@@ -49,7 +49,6 @@
@implementation BITUpdateViewController {
BOOL _kvoRegistered;
BOOL _showAllVersions;
UIStatusBarStyle _statusBarStyle;
BITAppStoreHeader *_appStoreHeader;
BITStoreButton *_appStoreButton;
@@ -339,8 +338,6 @@
self.appStoreButtonState = AppStoreButtonStateOffline;
_updateManager.currentHockeyViewController = self;
[super viewWillAppear:animated];
_statusBarStyle = [[UIApplication sharedApplication] statusBarStyle];
[[UIApplication sharedApplication] setStatusBarStyle:(self.navigationController.navigationBar.barStyle == UIBarStyleDefault) ? UIStatusBarStyleDefault : UIStatusBarStyleBlackOpaque];
[self redrawTableView];
}
@@ -349,7 +346,6 @@
//if the popover is still visible, dismiss it
[_popOverController dismissPopoverAnimated:YES];
[super viewWillDisappear:animated];
[[UIApplication sharedApplication] setStatusBarStyle:_statusBarStyle];
}
- (void)redrawTableView {