title: iOS: Add an image to the Navigation bar
body: <p>I'm currently working on an iOS app that is pretty much supposed look and work like an already existing android app.</p>
  
  <p>As a part of that, I'd like to make the top navigation look the same, but since iOs devices do not provide a hardware or software integrated back button, I'd also like to keep the back button navigation that's common to iOs apps.</p>
  
  <p>I've tried numerous attempts to achieve it, but I'll stick with the latest I'm working on since it looks the most promising. I've started to work on a custom <code>UINavigationBar</code> class that overrides the <code>initWithCoder:</code> and <code>layoutSubviews:</code> methods. The result is as follows:</p>
  
  <p><img src="https://i.imgur.com/OfBC6dG.png"/></p>
  
  <p>As you can see, the back button now overlaps the application icon. What I'm looking for is a way to make the button and the text to scale into the space right of the application icon. I've tried to handle this in <code>layoutSubviews:</code> but the superclass logic appears to be rather complex, I was not able to reproduce it's functionality (in particular it seems to be working with some private variables I don't have access to).</p>
  
  <p>I also tried manipulating <code>self.frame</code> before calling <code>[super layoutSubviews]</code> but apart from endless loops I was not able to achieve anything in that direction.</p>
  
  <p>I'd be happy if anyone could point me into the right direction.</p>