@@ -34,14 +34,17 @@ class AppDelegate : UIResponder, UIApplicationDelegate {
34
34
self . window!. tintColor = . red // prove that bar item tint color is inherited
35
35
36
36
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)
43
45
44
46
47
+
45
48
let ding = UIFont ( name: " ZapfDingbatsITC " , size: 40 ) !
46
49
let r = UIGraphicsImageRenderer ( size: CGSize ( 100 , 40 ) )
47
50
let im = r. image {
@@ -55,19 +58,7 @@ class AppDelegate : UIResponder, UIApplicationDelegate {
55
58
NSParagraphStyleAttributeName: p,
56
59
NSForegroundColorAttributeName: UIColor . red] )
57
60
}
58
-
59
61
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()
71
62
72
63
UITabBar . appearance ( ) . selectionIndicatorImage = im
73
64
0 commit comments