Hi everyone,
I have an image view which I initialized using following code:
...
imageView.frame = CGRect(x: width * (20 / width), y: navigationBar.frame.maxY, width: width * (335 / width), height: width * (335 / width))
imageView.contentMode = .scaleToFill
imageView.clipsToBounds = true
imageView.isUserInteractionEnabled = true
...
As you can see, currently the contentMode is set to .scaleToFill. If I use this setting, most of my image look strange though. The scale seems not to fit somehow. If I change the contentMode to .scaleAspectFill, then every image looks fine.
However, for my use case, it is required to use .scaleToFill. What can I do to do that? And why is it acting strange using .scaleToFill?