问题
I've got a basic storyboard setup that segue transitions through some view controllers by clicking a button. I've also got a Navigation controller at the root of the storyboard, hoping this segue chain performs similarly to how a series of Pushes used to work. The functionality is all there, as is the navigation bar controlling, however the transitions all have the new views coming in from the bottom and sliding up, Cover Vertical.
How do I configure this to slide in from the right side like the [deprecated] Push style navigation does? It may have even used to do it here, but I can't seem to get it to do it anymore.
回答1:
Self answered fix:
Interestingly enough, there was some questionable code during the first prepareForSegue that caused the navigationController to turn to nil. I removed the code, but for future reference-- if your self.navigationController turns nil then Segues will go vertical. If it is intact, they will be horizontal.
Also, while the segue claims "Push" action is deprecated, using it in code instead of presentViewController will still use the horizontal slide, while the presentViewController in code is vertical. Good to know.
来源:https://stackoverflow.com/questions/28071385/storyboard-segue-show-transition-vertical-from-bottom-instead-of-horizontal