【问题标题】:How can a view be placed on top of the navigation bar of a UINaviagationController subclass?如何将视图放置在 UINaviagationController 子类的导航栏顶部?
【发布时间】:2015-02-04 07:44:43
【问题描述】:

根视图控制器HomeTableViewController 嵌入在UINavigationController 中。一个subView如何占据整个屏幕,放在CustomNavigation: UINavigationController类的导航栏上方?

这是我正在使用的代码:

       if var player = self.moviePlayer {
            player.view.frame = self.view.bounds
            player.prepareToPlay()
            player.scalingMode = .AspectFill
            player.controlStyle = .None
            // self.view.addSubview(player.view)
            self.navigationController.view.addSubview(player.view)
        }

我看到了错误:

'UINavigationController?'没有名为“view”的成员

这是我的 Main.storyboard:

【问题讨论】:

    标签: swift uiview uinavigationcontroller


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 2016-10-02
      • 1970-01-01
      • 2015-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多