I am trying to add an image into the left bar button, but the image is being stretched even though the rect is 30x30. Any idea why this is happening or how to fix it?
button.frame = CGRect(x: 0, y: 0, width: 30, height: 30)
button.layer.cornerRadius = button.bounds.size.height / 2
button.clipsToBounds = true
button.imageView?.contentMode = .scaleAspectFill
self.navigationItem.leftBarButtonItem = UIBarButtonItem(customView: button)