use navigationBarTitleFont

This commit is contained in:
nixzhu
2015-04-29 15:37:35 +08:00
parent 2a56fc04f5
commit f8b417469b
4 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -209,7 +209,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
let textAttributes = [
NSForegroundColorAttributeName: UIColor.yepTintColor(),
NSShadowAttributeName: shadow,
NSFontAttributeName: UIFont(name: "HelveticaNeue-CondensedBlack", size: 20)!
NSFontAttributeName: UIFont.navigationBarTitleFont()
]
UINavigationBar.appearance().titleTextAttributes = textAttributes
+4
View File
@@ -20,4 +20,8 @@ extension UIFont {
class func skillTextLargeFont() -> UIFont {
return UIFont(name: "Helvetica-Light", size: 20)!
}
class func navigationBarTitleFont() -> UIFont {
return UIFont(name: "HelveticaNeue-CondensedBlack", size: 20)!
}
}
@@ -90,7 +90,7 @@ class ProfileViewController: UIViewController {
let textAttributes = [
NSForegroundColorAttributeName: UIColor.whiteColor(),
NSFontAttributeName: UIFont(name: "HelveticaNeue-CondensedBlack", size: 20)!
NSFontAttributeName: UIFont.navigationBarTitleFont()
]
navigationController.navigationBar.titleTextAttributes = textAttributes
@@ -47,7 +47,7 @@ class SettingsViewController: UIViewController {
let textAttributes = [
NSForegroundColorAttributeName: UIColor.yepTintColor(),
NSFontAttributeName: UIFont(name: "HelveticaNeue-CondensedBlack", size: 20)!
NSFontAttributeName: UIFont.navigationBarTitleFont()
]
navigationController.navigationBar.titleTextAttributes = textAttributes