本文介绍了如何以模态方式呈现 VC,然后转至嵌入在导航控制器中的 VC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用流程是这样的:

My app flow is like this:

(1) 应用将您引导至嵌入在 NavigationController 中的 LogInViewController.

(1) The app launches you into a LogInViewController that is embedded in a NavigationController.

(2) 在 LogInViewController 内部如果 runCount 我想展示一组未嵌入导航堆栈的教程 VC.

(2) Inside LogInViewController if runCount < 1 I want to present a set of tutorials VCs that are not embedded in a nav stack.

(3) 您可以点击跳过"或在浏览教程 VC 后点击确定"按钮,所有这些都会让您返回到 LoginViewController.

(3) You can tap "skip" or after swiping through the tutorial VCs you tap an "OK" button, all of which segue you back to LoginViewController.

问题在于,当您返回到 LogInViewController 时,没有 NavigationController.

The problem is that when you are segued back to LogInViewController there's no NavigationController.

解决这个问题的最佳方法是什么?

What's the best way to approach this?

推荐答案

答案其实很简单,与其将按钮连接到我的 LogInViewController,我所需要做的只是将它们连接到NavagationController 代替,因为它呈现了 LogInViewController

The answer is really simple, rather than wiring up the buttons to my LogInViewController all I needed to do was wire them up to the NavagationController instead since it presents the LogInViewController

这篇关于如何以模态方式呈现 VC,然后转至嵌入在导航控制器中的 VC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 11:13