From ee9d9b7a9043665da1a935499d64afdadcf7384b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E9=B9=8F?= <64hp@163.com> Date: Mon, 11 Jun 2018 17:02:04 +0800 Subject: [PATCH] fix --- NJDouYu/NJDouYu/Classes/Main/NJTabBarController.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/NJDouYu/NJDouYu/Classes/Main/NJTabBarController.swift b/NJDouYu/NJDouYu/Classes/Main/NJTabBarController.swift index e80f02e..fcdcea2 100644 --- a/NJDouYu/NJDouYu/Classes/Main/NJTabBarController.swift +++ b/NJDouYu/NJDouYu/Classes/Main/NJTabBarController.swift @@ -35,8 +35,10 @@ extension NJTabBarController { addChildVC(childController: NJMeViewController(tableViewStyle: UITableViewStyle.grouped), tabBartitle: "我的", image: "btn_user_normal", selImage: "btn_user_selected") } private func addChildVC(childController: UIViewController, tabBartitle: String, image: String, selImage: String) { - childController.tabBarItem.image = UIImage(named: image) - childController.tabBarItem.selectedImage = UIImage(named: selImage) +// childController.tabBarItem.image = UIImage(named: image) +// childController.tabBarItem.selectedImage = UIImage(named: selImage) + childController.tabBarItem.image = UIImage.nj_imageFromXcassets(name: image, bundleClass: self.classForCoder) + childController.tabBarItem.selectedImage = UIImage.nj_imageFromXcassets(name: selImage, bundleClass: self.classForCoder) childController.tabBarItem.title = tabBartitle childController.tabBarItem.titlePositionAdjustment = UIOffset(horizontal: 0, vertical: -3); tabBar.unselectedItemTintColor = UIColor.lightGray