Skip to content
Browse files

restored timing to setting viewController.backgestureEnabled

  • Loading branch information...
1 parent c25b4c5 commit 48d39e8f076fd694d2a8bad662e6ff07205bcde9 @ishkawa committed Aug 8, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 ISBackGesture/UIViewController+BackGesture.m
View
8 ISBackGesture/UIViewController+BackGesture.m
@@ -54,15 +54,15 @@ - (BOOL)backGestureEnabled
- (void)setBackGestureEnabled:(BOOL)backGestureEnabled
{
+ objc_setAssociatedObject(self, ISBackGestureEnabledKey, @(backGestureEnabled), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+
if (self.isViewLoaded) {
if (backGestureEnabled) {
[self startRecognizing];
} else {
[self stopRecognizing];
}
}
-
- objc_setAssociatedObject(self, ISBackGestureEnabledKey, @(backGestureEnabled), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
- (UIPanGestureRecognizer *)backGestureRecognizer
@@ -93,7 +93,7 @@ - (void)_viewDidUnload
- (void)startRecognizing
{
- if (!self.isViewLoaded || self.backGestureEnabled) {
+ if (!self.isViewLoaded || !self.backGestureEnabled) {
return;
}
@@ -108,7 +108,7 @@ - (void)startRecognizing
- (void)stopRecognizing
{
- if (!self.isViewLoaded || !self.backGestureEnabled) {
+ if (!self.isViewLoaded || self.backGestureEnabled) {
return;
}

0 comments on commit 48d39e8

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