@@ -34,14 +34,17 @@ class AppDelegate : UIResponder, UIApplicationDelegate {
3434 self . window!. tintColor = . red // prove that bar item tint color is inherited
3535
3636 UITabBarItem . appearance ( ) . setTitleTextAttributes ( [
37- NSFontAttributeName: UIFont ( name: " Avenir-Heavy " , size: 14 ) !
38- ] ,
39- for: . normal)
40-
41- // UIFont.familyNames()
42- // .map{UIFont.fontNamesForFamilyName($0 as String)}.map(println)
37+ NSFontAttributeName: UIFont ( name: " Avenir-Heavy " , size: 14 ) !,
38+ NSForegroundColorAttributeName: UIColor . green
39+ ] , for: . normal)
40+ // I am curious but yellow
41+ UITabBarItem . appearance ( ) . setTitleTextAttributes ( [
42+ NSFontAttributeName: UIFont ( name: " Avenir-Heavy " , size: 14 ) !,
43+ NSForegroundColorAttributeName: UIColor . yellow
44+ ] , for: . selected)
4345
4446
47+
4548 let ding = UIFont ( name: " ZapfDingbatsITC " , size: 40 ) !
4649 let r = UIGraphicsImageRenderer ( size: CGSize ( 100 , 40 ) )
4750 let im = r. image {
@@ -55,19 +58,7 @@ class AppDelegate : UIResponder, UIApplicationDelegate {
5558 NSParagraphStyleAttributeName: p,
5659 NSForegroundColorAttributeName: UIColor . red] )
5760 }
58-
5961
60- // UIGraphicsBeginImageContextWithOptions(CGSize(100,40), false, 0)
61- // let s = "\u{2713}"
62- // let p = NSMutableParagraphStyle()
63- // p.alignment = .right
64- // s.draw(in:CGRect(0,0,100,40),
65- // withAttributes:[
66- // NSFontAttributeName:ding,
67- // NSParagraphStyleAttributeName:p,
68- // NSForegroundColorAttributeName:UIColor.red()])
69- // let im = UIGraphicsGetImageFromCurrentImageContext()!
70- // UIGraphicsEndImageContext()
7162
7263 UITabBar . appearance ( ) . selectionIndicatorImage = im
7364
0 commit comments