方法不会在Superclass Swift 3中覆盖

时间:2016-11-28 07:28:36

标签: swift swift3

我在swift 3中转换我的代码他们给我错误方法不会覆盖超类。

override func prefersStatusBarHidden() -> Bool {

    var statusBarHidden: Bool

    switch statusBarStyle {
    case .hidden:
        statusBarHidden = true
    default:
        statusBarHidden = false
    }

    if visible || contentViewContainer.frame.origin.y <= 0, let cntViewController = contentViewController {
        statusBarHidden = cntViewController.prefersStatusBarHidden
    }

    return statusBarHidden
}

0 个答案:

没有答案