This is the code I'm using to set an image in the title of the nativation bar,
let imageView = UIImageView(frame: CGRect(x: 0, y: 0, width: 100, height: 30))
imageView.contentMode = .scaleAspectFit
let image = UIImage(named: "fullLogo")
imageView.image = image
self.navigationItem.titleView = imageView;
The issue is that image appears a little too big. How do I resize the image in code? I tried many combinations of the width and height but it doesn't seem to work.