翻转 ViewController 但保持与 Storyboard 相同的 NavigationController [英] Flip ViewController but maintain same NavigationController with Storyboard
问题描述
我正在尝试在导航控制器中翻转视图控制器,但到目前为止收效甚微,我尝试了数千种解决方案,但没有一个适合.我想像这样翻转控制器:
I'm trying to flip the viewcontroller inside navigationcontroller but with little success so far, I tried thousands of solutions but none suited. I want to flip the controller like this:
按下按钮进入地图:http://i39.tinypic.com/fabul3.jpg
按相同按钮返回更改图像:http://i40.tinypic.com/2qa1y0h.jpg
Press same button to go back with change image: http://i40.tinypic.com/2qa1y0h.jpg
我需要保持故事板的连贯性以进行转场.您对如何执行此操作有任何想法或示例吗?
I need to mantain the coerence with storyboard for segue. Do you have any idea or example of how to do this?
推荐答案
与翻转视图控制器相比,您可能会发现转换视图本身更容易.有一个标准的方法来翻转视图,这在这个问题中有介绍:
Rather than flipping the view controller, you may find it easier to transition the view itself. There's a standard way to flip views, which is covered in this question:
或者,您始终可以尝试通过自定义转场转换视图控制器本身,但我怀疑在 UIView 级别处理翻转会容易得多.
Alternatively, you could always try and transition the view controller itself through a custom segue, but I suspect it will be much easier to handle the flip at a UIView level.
这篇关于翻转 ViewController 但保持与 Storyboard 相同的 NavigationController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!