相关疑难解决方法(0)

如何识别导航堆栈中的先前视图控制器

我有两个单独的navigationcontrollers,一个与RootViewControllerA,另一个与RootViewControllerB.

我能够将ViewControllerC 推到A或B的导航堆栈上.

问题:当我在ViewControllerC中时,如何知道我是否在属于A或B的堆栈中?

objective-c uiviewcontroller uinavigationcontroller ios

78
推荐指数
7
解决办法
9万
查看次数

如何在堆栈中打开屏幕而不是在IOS中创建新屏幕

我遇到一个问题,如果一个Screen(ViewController)已经在堆栈中,那么它可以再次打开.设V1是视图控制器.我从V1到v2转到V1-> V2而不是V2-> V3.现在我想从V3打开V1.我正在使用NavigationViewController打开屏幕 -

let help = V1(nibName : "V1" , bundle:  nil)
navViewcontroller?.navigationController?.pushViewController(help, animated: true)
Run Code Online (Sandbox Code Playgroud)

这会创建一个新的V1屏幕我已经无法使用V1了.

请回答这是怎么回事,抱歉错误.

xcode applet ios swift

1
推荐指数
1
解决办法
66
查看次数