SwiftでTabBarの選択時の色とフォントを変える方法
TabBarController.swift
override func viewDidLoad() {
super.viewDidLoad()
let font:UIFont! = UIFont(name:"HelveticaNeue-Bold",size:10)
let selectedAttributes:NSDictionary! = [NSFontAttributeName : font, NSForegroundColorAttributeName : UIColor(red:0.13, green:0.55, blue:0.83, alpha:1.0)]
UITabBarItem.appearance().setTitleTextAttributes(selectedAttributes, forState: UIControlState.Selected)
UITabBar.appearance().tintColor = UIColor(red: 0.13, green: 0.55, blue: 0.83, alpha: 1.0)
}
これで簡単に色を変えることができます。