Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
steipete committed Aug 16, 2012
1 parent ae882ae commit 707e6d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions PSStackedView/PSStackedViewController.m
Expand Up @@ -980,11 +980,14 @@ - (void)pushViewController:(UIViewController *)viewController fromViewController

PSSVLog(@"pushing with index %d on stack: %@ (animated: %d)", [self.viewControllers count], viewController, animated);
viewController.view.height = [self screenHeight];

[viewController view]; //trigger viewDidload to ensure we get stack width

// get predefined stack width; query topViewController if we have a UINavigationController
CGFloat stackWidth = viewController.stackWidth;
if (stackWidth == 0.f && [viewController isKindOfClass:[UINavigationController class]]) {
UIViewController *topVC = ((UINavigationController *)viewController).topViewController;
[topVC view]; //trigger viewDidload to ensure we get stack width
stackWidth = topVC.stackWidth;
}
if (stackWidth > 0.f) {
Expand Down

0 comments on commit 707e6d9

Please sign in to comment.