title: leftbarbuttonitem does not show up in the navigation bar
body: <p>I've been developing an iOS app and have been having issues with using an image as the left bar button item in the navigation bar. I have attempted this in the following ways: </p>
  
  <pre><code>UIImage *backButtonImage = [UIImage imageNamed:@"backbuttonCB"];
  CGRect buttonFrame = CGRectMake(0, 0, backButtonImage.size.width, backButtonImage.size.height);
  UIButton *backButton = [[UIButton alloc] initWithFrame:buttonFrame];
  [backButton setImage:backButtonImage forState:UIControlStateNormal];
  UIBarButtonItem *backBarButtonItem= [[UIBarButtonItem alloc] initWithCustomView: backButton];
  self.navigationItem.leftBarButtonItem = backBarButtonItem;
  </code></pre>
  
  <p>The bar button never seems to display while running the app. </p>
  
  <p>I then proceeded to try this other method as follows.</p>
  
  <pre><code>self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"backbuttonCB"] style:UIBarButtonItemStylePlain target:nil action:@selector(methodname)];
  </code></pre>
  
  <p>This method actually worked. However, the image displayed was tinted blue and did not look like it was meant to. Changing the tint colour of this image did not help. </p>
  
  <p>Any idea how I can solve this problem? </p>
  
  <p>EDIT: More information, if it helps. 
  This is the first view in the navigation stack. The navigation stack is displayed modally i.e. there is a previous view controller and there is a modal segue between the previous view controller and the navigation controller. This is the first view in the navigation stack. </p>
  
  <p>EDIT: THE PROBLEM IS FIXED. 
  I think it was a bug in xcode because when I restarted xcode and tested it with an actual device instead of the emulator, it worked fine. However, still doesn't seem to work on an emulator.  </p>