iOS App Xcode构建错误
问题描述:
我是iOS开发的新手,并且很少遇到构建错误。我在网上查找了如何解决这些错误的信息,但没有得到任何提示。
I am new to iOS development and struggling with few build errors. I looked up the web on how to fix these errors but could not get a hint. Using Xcode 9.4 with built in Swift.
- 'LaunchOptionsKey'不是'UIApplication'的成员类型
- 实例成员'state'不能用于类型'UIControl'
- 实例成员'state'不能用于类型'UIControl'
- 类型'UIControl'没有成员'状态'
- 'LaunchOptionsKey' is not a member type of 'UIApplication'
- Instance member 'state' cannot be used on type 'UIControl'
- Instance member 'state' cannot be used on type 'UIControl'
- Type 'UIControl' has no member 'State'
下面是链接,因为不允许我在此帖子中包含屏幕截图。
Link is below as I was not allowed to include the screenshot in this post.
Xcode构建错误
答
应该是这样的:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
return true
}