自从我更新了Xcode之后,似乎无法更改titleTextAttribute
。现在当我使用以下代码时,会出现以下错误:
找不到接受此提供的参数的重载init
appDelegate
中的代码:
UINavigationBar.appearance().titleTextAttributes = [NSFontAttributeName: UIFont(name: "Ubuntu", size: 17), NSForegroundColorAttributeName:UIColor.whiteColor()]
UIBarButtonItem.appearance().setTitleTextAttributes([NSFontAttributeName: UIFont(name: "Ubuntu-Light", size: 15), NSForegroundColorAttributeName:UIColor.whiteColor()], forState: UIControlState.Normal)