Commit 0de5bea9 authored by bringbird's avatar bringbird

消除因适配不同系统版本调用过期API的警告

parent c278047c
...@@ -52,7 +52,10 @@ ...@@ -52,7 +52,10 @@
if (iOS9Later) { if (iOS9Later) {
barItem = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[TZImagePickerController class]]]; barItem = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[TZImagePickerController class]]];
} else { } else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
barItem = [UIBarButtonItem appearanceWhenContainedIn:[TZImagePickerController class], nil]; barItem = [UIBarButtonItem appearanceWhenContainedIn:[TZImagePickerController class], nil];
#pragma clang diagnostic pop
} }
NSMutableDictionary *textAttrs = [NSMutableDictionary dictionary]; NSMutableDictionary *textAttrs = [NSMutableDictionary dictionary];
textAttrs[NSForegroundColorAttributeName] = [UIColor whiteColor]; textAttrs[NSForegroundColorAttributeName] = [UIColor whiteColor];
...@@ -63,7 +66,10 @@ ...@@ -63,7 +66,10 @@
- (void)viewWillAppear:(BOOL)animated { - (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated]; [super viewWillAppear:animated];
_originStatusBarStyle = [UIApplication sharedApplication].statusBarStyle; _originStatusBarStyle = [UIApplication sharedApplication].statusBarStyle;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[UIApplication sharedApplication].statusBarStyle = iOS7Later ? UIStatusBarStyleLightContent : UIStatusBarStyleBlackOpaque; [UIApplication sharedApplication].statusBarStyle = iOS7Later ? UIStatusBarStyleLightContent : UIStatusBarStyleBlackOpaque;
#pragma clang diagnostic pop
} }
- (void)viewWillDisappear:(BOOL)animated { - (void)viewWillDisappear:(BOOL)animated {
...@@ -164,7 +170,10 @@ ...@@ -164,7 +170,10 @@
[alertController addAction:[UIAlertAction actionWithTitle:@"我知道了" style:UIAlertActionStyleDefault handler:nil]]; [alertController addAction:[UIAlertAction actionWithTitle:@"我知道了" style:UIAlertActionStyleDefault handler:nil]];
[self presentViewController:alertController animated:YES completion:nil]; [self presentViewController:alertController animated:YES completion:nil];
} else { } else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[[[UIAlertView alloc] initWithTitle:title message:nil delegate:nil cancelButtonTitle:@"我知道了" otherButtonTitles:nil, nil] show]; [[[UIAlertView alloc] initWithTitle:title message:nil delegate:nil cancelButtonTitle:@"我知道了" otherButtonTitles:nil, nil] show];
#pragma clang diagnostic pop
} }
} }
...@@ -270,7 +279,11 @@ ...@@ -270,7 +279,11 @@
backButton.titleLabel.font = [UIFont systemFontOfSize:15]; backButton.titleLabel.font = [UIFont systemFontOfSize:15];
[backButton addTarget:self action:@selector(popViewControllerAnimated:) forControlEvents:UIControlEventTouchUpInside]; [backButton addTarget:self action:@selector(popViewControllerAnimated:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem* backButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backButton]; UIBarButtonItem* backButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backButton];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
backButtonItem.style = UIBarButtonItemStyleBordered; backButtonItem.style = UIBarButtonItemStyleBordered;
#pragma clang diagnostic pop
self.topViewController.navigationItem.backBarButtonItem = backButtonItem; self.topViewController.navigationItem.backBarButtonItem = backButtonItem;
/** /**
......
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