Fix iOS 9 warnings

- Require iOS 7 as base SDK  (for compiling)
- Hide deprecation message for NSURLConnection calls, these will be refactored soon
- Remove statusbar adjustment code (which isn't needed any longer)
- Remove kBITTextLabel... defines and use NSText.. instead
- Remove a few `#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1` since we require iOS 7 as base now (for real)
This commit is contained in:
Andreas Linde
2015-07-22 15:32:27 +02:00
parent 4adf588d4a
commit 29acf3ef05
13 changed files with 74 additions and 120 deletions

View File

@@ -47,7 +47,6 @@
@interface BITFeedbackComposeViewController () <BITFeedbackUserDataDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UIActionSheetDelegate, BITImageAnnotationDelegate> {
UIStatusBarStyle _statusBarStyle;
}
@property (nonatomic, weak) BITFeedbackManager *manager;
@@ -275,19 +274,20 @@
[super viewWillAppear:animated];
_statusBarStyle = [[UIApplication sharedApplication] statusBarStyle];
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1
[[UIApplication sharedApplication] setStatusBarStyle:(self.navigationController.navigationBar.barStyle == UIBarStyleDefault) ? UIStatusBarStyleDefault : UIStatusBarStyleLightContent];
#else
[[UIApplication sharedApplication] setStatusBarStyle:(self.navigationController.navigationBar.barStyle == UIBarStyleDefault) ? UIStatusBarStyleDefault : UIStatusBarStyleBlackOpaque];
#endif
if (_text && self.textView.text.length == 0) {
self.textView.text = _text;
}
if (self.isStatusBarHiddenBeforeShowingPhotoPicker) {
[[UIApplication sharedApplication] setStatusBarHidden:self.isStatusBarHiddenBeforeShowingPhotoPicker.boolValue];
// requires iOS 7
if ([self respondsToSelector:@selector(prefersStatusBarHidden)]) {
[self setNeedsStatusBarAppearanceUpdate];
} else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[[UIApplication sharedApplication] setStatusBarHidden:self.isStatusBarHiddenBeforeShowingPhotoPicker.boolValue];
#pragma clang diagnostic pop
}
}
self.isStatusBarHiddenBeforeShowingPhotoPicker = nil;
@@ -295,6 +295,14 @@
[self updateBarButtonState];
}
- (BOOL)prefersStatusBarHidden {
if (self.isStatusBarHiddenBeforeShowingPhotoPicker) {
return self.isStatusBarHiddenBeforeShowingPhotoPicker.boolValue;
}
return [super prefersStatusBarHidden];
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
@@ -318,8 +326,6 @@
self.manager.currentFeedbackComposeViewController = nil;
[super viewWillDisappear:animated];
[[UIApplication sharedApplication] setStatusBarStyle:_statusBarStyle];
}
- (void)viewDidDisappear:(BOOL)animated {