here is my code :-
let storyBoard = UIStoryboard(name: “Main”, bundle: nil)
let trainerHomeCtrl = MyWorkScheduleController()//MyProfileController()
trainerHomeCtrl.tabBarItem = UITabBarItem(title: “My Profile”, image: #imageLiteral(resourceName: “homeIconActive”), tag: 0)
let workScheduleController = WorkScheduleController()
workScheduleController.tabBarItem = UITabBarItem(title: "Work Schedule", image:#imageLiteral(resourceName: "workScheduleIcon"), tag: 1)
let messageController = storyBoard.instantiateViewController(withIdentifier: "MessageViewController")
messageController.tabBarItem = UITabBarItem(title: "Message", image: #imageLiteral(resourceName: "messageInactiveIcon"), tag: 3)
let myPostController = TimelineController()
myPostController.tabBarItem = UITabBarItem(title: "Timeline", image: #imageLiteral(resourceName: "timelineIconInactive") , tag: 4)
let sessionListView = storyBoard.instantiateViewController(withIdentifier: "TrainerScheduleListView")
sessionListView.tabBarItem = UITabBarItem(title: "Session List", image: #imageLiteral(resourceName: "sessionListIcon"), tag: 2)
let myPackageController = MyPackageController()
myPackageController.tabBarItem = UITabBarItem(title: "My Package", image:#imageLiteral(resourceName: "myPackages"), tag: 5)
let mySchduleController = storyBoard.instantiateViewController(withIdentifier: "MySchduleController") as! MySchduleController
mySchduleController.IsNotComeFromDrawer = true
mySchduleController.tabBarItem = UITabBarItem.init(title: "My Schedule", image: #imageLiteral(resourceName: "myBookingsInactiveIcon"), tag: 6)
let privacyPolicyCtrl = TermsAndConditionController()
privacyPolicyCtrl.isClient = false
privacyPolicyCtrl.isForTermsAndCondition = false
privacyPolicyCtrl.tabBarItem = UITabBarItem.init(title: "Privacy Policy", image: #imageLiteral(resourceName: "privacyPolicy"), tag: 6)
let termsAndConditionCtrl = TermsAndConditionController()
termsAndConditionCtrl.isClient = false
termsAndConditionCtrl.isForTermsAndCondition = true
termsAndConditionCtrl.tabBarItem = UITabBarItem.init(title: "Terms & Conditions", image: #imageLiteral(resourceName: "termsAndConditions"), tag: 6)
let faqCtrl = FAQController()
faqCtrl.isClient = false
faqCtrl.tabBarItem = UITabBarItem.init(title: "FAQ", image:#imageLiteral(resourceName: "faQs"), tag: 6)
let contactController = ContactUsController()
contactController.isClient = false
contactController.tabBarItem = UITabBarItem.init(title: "Reach Us", image: #imageLiteral(resourceName: "email"), tag: 8)
let tabbarCtrl = storyBoard.instantiateViewController(withIdentifier: "TabbarController") as! UITabBarController
tabbarCtrl.viewControllers = [ UINavigationController(rootViewController: trainerHomeCtrl),
UINavigationController(rootViewController: workScheduleController ),
UINavigationController(rootViewController: sessionListView ),
UINavigationController(rootViewController: messageController ),
UINavigationController(rootViewController: mySchduleController),
UINavigationController(rootViewController: myPackageController),
UINavigationController(rootViewController: myPostController ),
UINavigationController(rootViewController: termsAndConditionCtrl),
UINavigationController(rootViewController: privacyPolicyCtrl),
UINavigationController(rootViewController: faqCtrl),
UINavigationController(rootViewController: contactController)
]
tabbarCtrl.customizableViewControllers = []
tabbarCtrl.moreNavigationController.navigationBar.barTintColor = UIColor.appDefaultColor()
tabbarCtrl.moreNavigationController.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName:UIColor.white]
but i am getting the colors for the tabs inside moreNavigationController.navigationBar as in the image below