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:

enter image description here

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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -