Chain two segues to look like one

时光怂恿深爱的人放手 提交于 2019-12-12 03:24:19

问题


I have this structure in story board (lines represents segues):

    B    
   /
  A
   \
    C

I want to use A (view controller) as a "hub". But I want to say in C that I want to B. I'll set next target (doesn't matter how) and perform unwind from C to A which know where to go next, and in unwind target action it calls ther right performSegueWithIdentifier but nothing happens.

This was supposed to be an proof of concept and it would results in two animations. The target solution would be for user to transition the UI directly from the C to B.

Can anyone suggest some possible solutions?

Thanks.

Additional info: B and C are storyboard references.


回答1:


I would suggest considering the use of a UITabBarController. This would allow users to move freely between ViewControllers.

Each tab of a tab bar controller interface is associated with a custom view controller. When the user selects a specific tab, the tab bar controller displays the root view of the corresponding view controller, replacing any previous views.



来源:https://stackoverflow.com/questions/35821305/chain-two-segues-to-look-like-one

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!