我有以下故事板结构:
基本上我有一个UIButon,我想链接到" TargetTableViewController"通过IBAction
- 不通过' Ctrl +拖动'但是以编程的方式编程。
我相信我必须呈现" NavViewControllerTwo"作为NavigationController(因为它拥有'"" HoldViewController")并且已经通过StackOverflow上的许多线程尝试了各种再现。但这没效果。
我怀疑是因为实际的" TargetTableViewController"嵌入在ContainerView
" HoldingViewController"这会导致问题。
我已尝试实现其他演示" TargetTableViewController"作为" HoldViewController"的child
,但这给我带来了更多问题。
我意识到我可能在这里有过于复杂的东西,但容器的原因是我想在最终呈现的视图的底部显示一个BannerView。
如果有人能够指出我正确的方向,我将非常感激。谢谢你的时间。
**澄清**
我实际上是想呈现" HoldingViewController"因为这将有效地显示我的" TargetTableViewController"。
请参阅以下修正图片:
对于混乱和缺乏澄清道歉。
答案 0 :(得分:0)
在故事板中将MainViewController中的segue设置为NavViewControllerTwo,给它一个标识符,然后使用[self performSegueWithIdentifier ...
在按钮按下操作中执行代码中的segue