Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit bbf898cec0f8daa0d12c2419e073ccd0df026bde 1 parent c600812
@coreyfloyd coreyfloyd authored committed
View
4 PSStackedView/PSStackedViewController.h
@@ -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;
View
7 PSStackedView/PSStackedViewController.m
@@ -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];
Please sign in to comment.
Something went wrong with that request. Please try again.