iPhone:从按钮导航

Posted

技术标签:

【中文标题】iPhone:从按钮导航【英文标题】:iPhone: Navigation from button 【发布时间】:2010-01-13 03:49:38 【问题描述】:

大家好,我有一个 RootViewController,它有他的 nib 文件 RootView.nib。无论如何,当您按下按钮时,它会将您发送到我的 SecondViewController(SecondViewController 也有他的 SecondViewController.nib 文件)。

现在 SecondViewController 有一个 IBOutlet UINavigationController 并且还有来自 NavigationController 的委托。

但我可以让应用程序从第二个视图开始导航,我尝试连接 IB 中的所有内容,但没有任何效果。

我需要这方面的帮助,该应用需要从第二个视图进行导航。 最好的祝福 卡洛斯·巴尔加斯

【问题讨论】:

【参考方案1】:

nvm这个我已经解决了,和IB没关系。

刚刚添加了一个 UINavigationController *nav 到 RootViewController 然后这样做:

SecondViewController *second = [[SecondViewController alloc]initWithNibName:...];

nav = [[UINavigationController alloc]initWithRootViewController:second];

[self presentModalViewController:nav animated:NO];

[导航发布];[第二次发布];

【讨论】:

以上是关于iPhone:从按钮导航的主要内容,如果未能解决你的问题,请参考以下文章