【问题标题】:Connecting Button to Navigational View Controller将按钮连接到导航视图控制器
【发布时间】:2016-03-14 13:47:32
【问题描述】:

这是 iOS 应用程序中帐户选项卡的设计。

我想将注销按钮与登录界面连接起来。 并将编辑界面中的完成按钮连接到帐户界面。

但是当我使用 show 或 model segeue 连接它们时,会发生这种情况!

有没有办法通过编码把它们连接起来却得不到这个结果?

你能帮我吗,我必须做些什么才能让它工作?

【问题讨论】:

    标签: ios xcode swift button interface


    【解决方案1】:

    如果是根视图控制器,你应该试试这个

    self.navigationController?.popToRootViewControllerAnimated(true)
    

    如果不是那么

    // pops to the 3rd controller in the stack, because indexing starts with 0
    navigationController!.popToViewController(navigationController!.viewControllers[2], animated: false)
    

    【讨论】:

      猜你喜欢
      • 2020-08-08
      • 1970-01-01
      • 2013-02-19
      • 1970-01-01
      • 1970-01-01
      • 2018-06-01
      • 1970-01-01
      • 2013-06-11
      • 1970-01-01
      相关资源
      最近更新 更多