Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the toolbar color in Swift

Tags:

ios

swift

I'm working on an app and I'm not sure how to change the color of the bottom toolbar in swift. I would like to have it as a custom image to match my navigation bar. Does anyone have a code for that or just to change the color. Thank you

like image 692
John Harris Avatar asked Aug 11 '15 02:08

John Harris


1 Answers

Change background color:

self.toolbar.barTintColor = UIColor.redColor()

Change background image:

self.toolbar.setBackgroundImage(UIImage(named: "BackgroundImage"), forToolbarPosition: .Bottom, barMetrics: .Default)
like image 54
Bannings Avatar answered Sep 21 '22 14:09

Bannings