ios8 - Change tintColor of Tab Bar in UIView via Storyboard or Swift? -
i've found post on how change tint color of tab bar button, assumes using tab bar controller. tried way , did not make difference. using regular uiview , dragged tab bar control on there. how change button tint color in scenario? storyboard , code suggestions not making change. tried add these viewdidload
ever, neither had effect:
self.view.tintcolor = uicolor.orangecolor() self.tabbarcontroller?.tabbar.tintcolor = uicolor.orangecolor()
i able change nav bar buttons tints via storyboard no problem, tab bar isn't having effect. trying match changes did nav bar:
if using tab bar controller, work tab bar background color:
tabbarcontroller?.tabbar.bartintcolor = uicolor.whitecolor()
and color of items within tab bar:
tabbarcontroller?.tabbar.tintcolor = uicolor.blackcolor()
if not using tab bar controller, , dragged tab bar view controller: control drag tab bar in storyboard view controller's swift file create new referencing outlet. should if you're unfamiliar:
@iboutlet weak var mytabbar: uitabbar!
then use same lines of code above replacing few things:
mytabbar.bartintcolor = uicolor.whitecolor() mytabbar.tintcolor = uicolor.blackcolor()
Comments
Post a Comment