从两个容器视图中的不同子视图控件中的不同导航栏按钮项? [英] Different Navigation Bar Button Items in different child viewcontrollers from two container views?

查看:127
本文介绍了从两个容器视图中的不同子视图控件中的不同导航栏按钮项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了一个 UIViewController (RootViewController),其中两个容器视图连接到两个 UITableViewController 。每个 UITableViewController 都是根据RootViewController中的 UISegmentedControl 选择的。

I have setup a UIViewController(RootViewController) with two container views connected to two UITableViewControllers. Each of the UITableViewController is selected based on the UISegmentedControl in the RootViewController.

我可以按照我的意图进行调整,但子控制器中的条形按钮项( UITableViewController )没有响应。

I'm able to segue as I intended to, but the bar button items in the child controllers (UITableViewController) are not responding.

两个子视图控制器中的导航栏按钮项目彼此不同。

The navigation bar button items in the two child view controllers are different from each other.

请查找我的故事板的屏幕截图。 (仅显示一个子控制器)

Please find a screenshot of my storyboard. (Only one child controller displayed)

< img src =https://i.stack.imgur.com/vR59L.pngalt =screenshot>

如何设置不同的导航每个容器视图控制器的条形按钮?

How to setup different navigation bar buttons for each of those container view controllers?

推荐答案

您是否在UINavigation堆栈上推送它们?

Did you push them on the UINavigation stack?

 func pushViewController(ViewController, animated: true)

这篇关于从两个容器视图中的不同子视图控件中的不同导航栏按钮项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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