在UINavigationBar.appearance().tintColor
中设置didFinishLaunchingWithOptions
,用于更改整个应用中的tintColor
。在iOS 10上,情况已经不是这样了。
private func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Set tint color
UINavigationBar.appearance().tintColor = UIColor.black
return true
}
如何更改导航栏色调颜色?
答案 0 :(得分:2)
问题是你的didFinishLaunchingWithOptions方法。在iOS 10中进行了更改。
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool