【问题标题】:Modal view controller under Navigation Bar - Swift导航栏下的模态视图控制器 - Swift
【发布时间】:2017-08-05 18:13:11
【问题描述】:

我有这种情况:

导航控制器中的一个标签栏。 在导航栏中有一个导航项(它是一个按钮)。 当我点击它时,我想显示一个模式控制器,它在导航栏下打开并覆盖标签栏。

我这样做了:

func tapButtonNavigationBar(){

     let search = self.storyboard?.instantiateViewController(withIdentifier: "search) as! SearchController
        self.present(search, animated: true, completion: nil)
}

但是,通过这段代码,新的“搜索”控制器位于导航栏下方。 你能帮帮我吗?

【问题讨论】:

    标签: ios swift uiviewcontroller uinavigationcontroller uitabbarcontroller


    【解决方案1】:

    我知道的一种方法是您可以添加指定框架的子视图而不是视图控制器并使用动画打开它。

    【讨论】:

      猜你喜欢
      • 2011-10-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多