ios - How to change color for tab bar non selected icon in swift? -
how change color tab bar non selected icon , text? found answer ( how change inactive icon/text color on tab bar? ), can't implement swift. the below sets defaults uitabbaritem's, can add appdelegate . change text color. uitabbaritem.appearance().settitletextattributes({nsforegroundcolorattributename: uicolor.blackcolor()}, forstate:.selected) uitabbaritem.appearance().settitletextattributes({nsforegroundcolorattributename: uicolor.whitecolor()}, forstate:.normal) for changing icon' color can either set image given state image have color. self.tabbaritem.selectedimage = [[uiimage imagenamed:@"selectedimage"] imagewithrenderingmode:uiimagerenderingmodealwaysoriginal]; self.tabbaritem.image = [[uiimage imagenamed:@"notselectedimage"] imagewithrenderingmode:uiimagerenderingmodealwaysoriginal]; or can way : add extension uiimage class (from this answer ) : extension uiimage { func imagewithcolor(color1: uicolor) -> uiimage { ...