Skip to content
Browse files

Fix warning: implementing deprecated method when deployment target is…

… set to 6.0
  • Loading branch information...
1 parent ca967c5 commit 9e6fc6ef42df0dfab226fa7444e5665332aead60 @myell0w myell0w committed Nov 7, 2012
Showing with 15 additions and 8 deletions.
  1. +15 −8 JASidePanels/Source/JASidePanelController.m
View
23 JASidePanels/Source/JASidePanelController.m
@@ -168,14 +168,6 @@ - (void)viewDidLoad {
[self.view bringSubviewToFront:self.centerPanelContainer];
}
-- (void)viewDidUnload {
- [super viewDidUnload];
- self.tapView = nil;
- self.centerPanelContainer = nil;
- self.leftPanelContainer = nil;
- self.rightPanelContainer = nil;
-}
-
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
// ensure correct view dimensions
@@ -185,6 +177,16 @@ - (void)viewWillAppear:(BOOL)animated {
[self styleContainer:self.centerPanelContainer animate:NO duration:0.0f];
}
+#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0
+
+- (void)viewDidUnload {
+ [super viewDidUnload];
+ self.tapView = nil;
+ self.centerPanelContainer = nil;
+ self.leftPanelContainer = nil;
+ self.rightPanelContainer = nil;
+}
+
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
__strong UIViewController *visiblePanel = self.visiblePanel;
@@ -195,6 +197,8 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfa
}
}
+#else
+
- (BOOL)shouldAutorotate {
__strong UIViewController *visiblePanel = self.visiblePanel;
@@ -205,6 +209,9 @@ - (BOOL)shouldAutorotate {
}
}
+
+#endif
+
- (void)willAnimateRotationToInterfaceOrientation:(__unused UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
self.centerPanelContainer.frame = [self _adjustCenterFrame];
[self _layoutSideContainers:YES duration:duration];

0 comments on commit 9e6fc6e

Please sign in to comment.
Something went wrong with that request. Please try again.