title: iOS navigation back button inside custom UIView XIB (without navigation controller)
body: <p>I have an app that has a reusable XIB for a view that is included in every view controller of the app.</p>
  
  <p>This XIB is responsible for rendering top-side views which are not navigation bar right now.
  A navigation item is not something that is needed right now.</p>
  
  <p>However, based on contextual navigation, there maybe a need for user to be able to go back to previous view, and a Back button is a requirement for such cases.</p>
  
  <p>I would like to make this Back button part of this reusable XIB which forms top-side view inside every scene - but only conditionally, not everywhere.</p>
  
  <p>I read documentation, and other questions on SO that tells me that UIBarButtonItem only exist in conjunction with a nav-controller.</p>
  
  <p>I think this is an overkill for me, because:</p>
  
  <p>1) I don't need back button everywhere</p>
  
  <p>2) I don't need the look of nav-bar as top bar. My top bar is already designed in my XIB.</p>
  
  <p>What should I change?</p>
  
  <ul>
  <li>My XIB? If I can create outlets here for back button and make them hidden depending upon which view controller I am inside, it would be a highly welcome solution.</li>
  <li>My XIB view .m file? </li>
  <li>My view controller code where I want Back button? </li>
  </ul>
  
  <p>An example with code will be highly appreciated.</p>