nevyn / SPStackedNav

Apache License 2.0
7 stars 0 forks source link

Really properly and thoroughly document why one would use `-pushViewController:onTopOf:animated:` vs `-pushViewController:animated:` #5

Open nevyn opened 6 years ago

nevyn commented 6 years ago

In short: With StackedNav, you are able to interact with a view controller other than the one at top. If user interacts with a VC in the middle of the stack, and from that interaction, you call just regular -pushViewController:animated:, that would push on top of the previous top VC, instead of on top of the current VC that the user is interacting with. And, all of the VCs to the right of the current one will still be on the stack, even though they are no longer relevant.

We could make an API where pushViewController:animated: figures out the VC that the user tapped in, but that's fragile and will break if the actual pushing happens from an asynchronous source.

So, make sure this core concept is documented, with images, in both readme and header.