简体   繁体   English

'NavigationController' 类型的值没有成员

[英]Value of type 'NavigationController' has no member

I have downloaded this messenger code from a github repository and i have set everything up (from what I'm aware of) such as the firebase and installed the cocoa pops.我已经从 github 存储库下载了这个信使代码,并且我已经设置了所有东西(据我所知),例如 firebase 并安装了 Z1ED76D35F95379C2C1B160C2154C5C4。 Everything seems to be running fine except 14 errors which all say the same thing reading -一切似乎都运行良好,除了 14 个错误,它们都说同样的事情 -

"Value of type 'NavigationController' has no member 'isModalInPresentation'" “‘NavigationController’类型的值没有成员‘isModalInPresentation’”

or或者

"Value of type 'LoginEmailView' has no member 'isModalInPresentation'" “'LoginEmailView' 类型的值没有成员 'isModalInPresentation'”

or或者

"Value of type 'RegisterEmailView' has no member 'isModalInPresentation'" “‘RegisterEmailView’类型的值没有成员‘isModalInPresentation’”

I have attached some of the code:)我附上了一些代码:)

@IBAction func actionLoginPhone(_ sender: Any) {

    let loginPhoneView = LoginPhoneView()
    loginPhoneView.delegate = self
    let navController = NavigationController(rootViewController: loginPhoneView)
    navController.modalPresentationStyle = .overFullScreen
    if #available(iOS 13.0, *) {
        navController.isModalInPresentation = true
        navController.modalPresentationStyle = .fullScreen
    }
    present(navController, animated: true)
}

This might be an issue of your SDK version.这可能是您的 SDK 版本的问题。

The given instance property isModalInPresentation was introduced in SDK iOS 13+ only, so you must have that or a later version of SDK.给定的实例属性 isModalInPresentation 是在 SDK iOS 13+ 中引入的,因此您必须拥有该或更高版本的 SDK。

Otherwise, what version SDK does your Xcode have?否则,您的 Xcode 有什么版本的 SDK?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM