链接两个 segue 看起来像一个 [英] Chain two segues to look like one

查看:37
本文介绍了链接两个 segue 看起来像一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在故事板中有这个结构(线代表转场):

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

    B    
   /
  A
   \
    C

我想使用 A(视图控制器)作为中心".但是我想在C 中说我想要B.我将设置下一个目标(不管如何)并执行从 CA 的展开,它知道下一步要去哪里,并在展开目标操作中正确调用performSegueWithIdentifier 但没有任何反应.

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.

这应该是一个概念证明,它会产生两个动画.目标解决方案是让用户将 UI 直接从 C 转换为 B.

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?

谢谢.

附加信息:BC 是故事板参考.

Additional info: B and C are storyboard references.

推荐答案

我建议考虑使用 UITabBarController.这将允许用户在 ViewController 之间自由移动.

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.

这篇关于链接两个 segue 看起来像一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆