11
所以我写这个程序有丰富多彩navigationbars并在这条标题的字体和UIBarButtonItems的字体应该是白色的,并在特定的字体。我用这两条线来完成,在AppDelegate中..的Xcode 6.1 titleTextAttributes
UINavigationBar.appearance().titleTextAttributes = [NSFontAttributeName : UIFont(name: "SourceSansPro-Regular", size: 22), NSForegroundColorAttributeName : UIColor.whiteColor()]
UIBarButtonItem.appearance().setTitleTextAttributes([NSFontAttributeName : UIFont(name: "SourceSansPro-Regular", size: 22), NSForegroundColorAttributeName : UIColor.whiteColor()], forState: .Normal)
但在Xcode 6.1我在每个线得到一个错误,我真的不知道,什么手段..
文本属性是[NSObject的:AnyObject] ?.这正是我写下来的。有没有人有这个解决方案?
没错,就是它!非常感谢你。我认为这是一个初始者可以返回零,但它是有道理的非常混乱。:) – Ben 2014-10-09 08:27:23
爱它谢谢! – 2015-01-10 02:16:17