Adding a custom back button “the standard way”

My idea was to implement a Root ViewController that would restyle the standard back-button.
Turned out this was not easy at all. After about 1 day of fiddling around with different options
I finally came to a working solution.

The trick is to have a transparant background that is BIG enough (bigger then the actual back chevron otherwise this gets resized to smaller size) and then use a custom image for the chevron.

It works, but as you can see on the measurements below, it has a small disadvantage: there is an extra 14 points of gap on the left. If you want matching buttons on the right, you will need to compensate this by 14 points (and yes its points so on retina this is 28 pixels…)

custombackbuttonstoryboard

custombackbuttonmeasurements

Adding a custom back button “the standard way”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">