I’d like to do something that I presumed would be quit simple but turned out to be quite hard! I want to style the navigationbar and toolbar of my navigationcontroller. I want them both to have:
- A custom background image, I know I can use appearance proxies but this will not meet the requirements of the following point.
- The navigationbar and toolbar should be of the same height of the background images that I set for them. I’ve tried setting the frame height but it didn’t work.
- Lastly I’d then like to add some buttons (with specific height and widths, not something fixed/standard) to the navigationbar and toolbar, but I hope the toolbar/navigation will just behave like an UIView.
How do I achieve these three points? Thanks!
What I did for this was to create images that looked exactly like the built in navigation bar. I also created a back button which was very close to the default one. You could of course do whatever you like. This did take a fair bit of time but once you’ve done that, you can just load them into your app as a UIImageView and a UIButton. Easy as pie. And totally customizable.