Permalink
Browse files

Add "display root view controller" method (without popping)

  • Loading branch information...
1 parent c600812 commit bbf898cec0f8daa0d12c2419e073ccd0df026bde @coreyfloyd coreyfloyd committed with Feb 12, 2012
Showing with 11 additions and 0 deletions.
  1. +4 −0 PSStackedView/PSStackedViewController.h
  2. +7 −0 PSStackedView/PSStackedViewController.m
@@ -66,6 +66,10 @@ enum {
/// expands/collapses stack until entered controller is topmost right
- (BOOL)displayViewControllerOnRightMost:(UIViewController *)vc animated:(BOOL)animated;
+//expand stack until root view is shown
+- (void)displayRootViewControllerAnimated:(BOOL)animated;
+
+
/// return view controllers that follow a certain view controller. Helper function.
- (NSArray *)viewControllersAfterViewController:(UIViewController *)viewController;
@@ -539,6 +539,13 @@ - (void)displayViewControllerIndexOnRightMost:(NSInteger)index animated:(BOOL)an
}
}
+- (void)displayRootViewControllerAnimated:(BOOL)animated{
+
+ self.floatIndex = 0.0f;
+ [self alignStackAnimated:YES];
+
+}
+
// iterates controllers and sets width (also, enlarges if requested width is larger than current width)
- (void)updateViewControllerSizes {
CGFloat maxControllerView = [self maxControllerWidth];

0 comments on commit bbf898c

Please sign in to comment.