//设置tabBarItem的title,以及点击和不点击状态图片
self.tabBarController.tabBarItem = UITabBarItem(title: "投资理财", image: image, selectedImage: imageSeleted);
 
//设置tabBarItem的title的字体颜色和字大小及字体样式 
self.tabBarController
.tabBarItem.setTitleTextAttributes([NSForegroundColorAttributeName:BGColor,NSFontAttributeName:UIFont(name: "Helvetica-Bold", size: 12)!], forState: UIControlState.Normal)
self.tabBarController.tabBarItem.setTitleTextAttributes([NSForegroundColorAttributeName:UIColor.blackColor(),NSFontAttributeName:UIFont(name: "Helvetica-Bold", size: 12)!], forState: UIControlState.Selected)

 

posted on 2016-04-22 16:50  莫雨  阅读(1197)  评论(0编辑  收藏  举报