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

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

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

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

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

【问题讨论】:

    标签: iphone button uinavigationcontroller


    【解决方案1】:

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

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

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

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

    [self presentModalViewController:nav animated:NO];

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-14
      • 1970-01-01
      • 2021-10-21
      • 1970-01-01
      相关资源
      最近更新 更多