title: Swift 4 - Resizing Navigation Buttons Programatically
body: <p>I'm not using storyboards and need to know how to resize and reposition the left bar button. The image I'm using is too big and not far enough to the left.</p>
  
  <pre><code>let leftBarItem = UIBarButtonItem(image: (image), landscapeImagePhone: (image), style: .plain, target: self, action: nil)
  
      self.navigationItem.leftBarButtonItem = leftBarItem
  </code></pre>
  
  <p>This code makes this -</p>
  
  <p><a href="https://i.stack.imgur.com/JrFSR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JrFSR.png" alt="enter image description here"></a></p>
  
  <p>But I need it to look like this -</p>
  
  <p><a href="https://i.stack.imgur.com/QdzE7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QdzE7.png" alt="enter image description here"></a></p>
  
  <p>I would rather not go back and resize the actual image in Photoshop. What are my options? Thank you!</p>