John Harris John Harris - 9 months ago 55
iOS Question

How can I change the toolbar color in 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


Change background color:

self.toolbar.barTintColor = UIColor.redColor()

Change background image:

self.toolbar.setBackgroundImage(UIImage(named: "BackgroundImage"), forToolbarPosition: .Bottom, barMetrics: .Default)