【发布时间】:2019-01-05 05:19:46
【问题描述】:
当我刚开始学习编程时,它显示了我的代码存在以下错误。
使用未声明的类型“NSObect” 无法调用非函数类型“UIColor”的值 无法调用非函数类型'UIColor'的值
有人可以在这里指出我的错误并更正我的代码吗?谢谢你,如果你能帮忙:)
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions:
[NSObect:AnyObject]?) -> Bool {
self.window = UIWindow(frame:
UIScreen.main.bounds)
self.window!.backgroundColor = UIColor.whiteColor()
let myTabBar = UITabBarController()
myTabBar.tabBar.backgroundColor = UIColor.clearColor()
let mainViewController = ViewController()
mainViewController.tabBarItem =
UITabBarItem(tabBarSystemItem: .favorites, tag: 100)
let articleViewController = ArticleViewController()
articleViewController.tabBarItem = UITabBarItem(
【问题讨论】:
-
除了(部分)旧的 Swift 2 代码
NSObect是一个错字之外,它是NSObject
标签: swift