title: image for nav bar button item swift
body: <p>I want to display an image in the left hand side of my nav bar in swift.</p>
  
  <p>I have tried adding a nav bar button item and setting an image there.</p>
  
  <p>The problem is that I have to use a really small image for it to fit in the nav bar nicely. But making such a small image leads to pixelation especially on the bigger phone iPhone 6 and 6 Plus.</p>
  
  <p>Is there a way to use a good quality image and then set the frame to fit within the bounds of the nav bar?</p>
  
  <p>My attempt:</p>
  
  <pre><code>var image = UIImage(named: "Harp.png")
  
  image = image?.imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal)
  
  self.navigationItem.leftBarButtonItem = UIBarButtonItem(image: image, style: UIBarButtonItemStyle.Plain, target: nil, action: nil)
  self.navigationItem.leftBarButtonItem.frame = CGRectMake(0, 0, 53, 31)
  //image.frame = CGRectMake(0, 0, 53, 31)
  </code></pre>
  
  <p>I tried putting the frame on the image first and then on the bar button item.
  But this is throwing up an error: </p>
  
  <p>Type of expression is ambiguous without more context.</p>