steipete/PSStackedView — Issue #15: Unable to push new VC to top of stack
Author: mstrchrstphr
Created: 2012-01-20 22:17:46+00:00
State: open

Hello,

The header defines the topViewController as the "last" VC on the stack. I would expect the following code to push the new VC after the last VC on the stack but it does not if I have panned the views to somewhere in the middle of the stack:

```obj-c
[self pushViewController:contentVC animated:YES];
```

neither does

```obj-c
[self pushViewController:contentVC fromViewController:[self topViewController] animated:YES];
```
or

```obj-c
[self pushViewController:contentVC fromViewController:[[self viewControllers] lastObject] animated:YES];
```

Again, it works fine if I am on the last view, but if I pan back a few views, the new VC is inserted a couple of views in from the end (not at the end, where I would expect it).

Am I using this incorrectly or is this a bug?

Thanks,
Chris