Tunyk Pavel
Tunyk Pavel

Reputation: 2493

custom background in uinavigationbar non application-wide, different for each view

I found a lot of solutions to make custom background in uiNavigationBar, but they all application-wide, how to do the same things in each view (each view have different background?

Upvotes: 1

Views: 321

Answers (1)

Steven Kramer
Steven Kramer

Reputation: 8503

This is quite hard to do completely correctly, but you can simply make a subclass that has a configurable background image as a first effort. Then switch the background image as you navigate from/to other views.

You must also set the tintColor of the bar when you change the background, so the bar buttons are colored correctly.

Upvotes: 1

Related Questions