Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

'Don't pop last controller' issue fixed

  • Loading branch information...
commit 5b53206370f623a412b8cc0f70e7a96329e02836 1 parent 2a543d0
@bfolder authored
View
9 BFNavigationController.m
@@ -254,16 +254,17 @@ -(NSArray *)popToViewController: (NSViewController *)viewController animated: (B
return nil;
NSViewController *visibleController = self.visibleViewController;
+
+ // Don't pop last controller
+ if(visibleController == viewController)
+ return nil;
+
NSUInteger index = [_viewControllers indexOfObject: viewController];
NSUInteger length = [_viewControllers count] - (index + 1);
NSRange range = NSMakeRange(index + 1, length);
NSArray *dispControllers = [_viewControllers subarrayWithRange: range];
[_viewControllers removeObjectsInArray: dispControllers];
- // Don't pop last controller
- if(visibleController == viewController)
- return nil;
-
// Navigate
[self _navigateFromViewController: visibleController toViewController: viewController animated: animated push: NO];
View
BIN  ...ollerExample.xcodeproj/project.xcworkspace/xcuserdata/bfolder.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.