0

I am trying to have my UIImageView centerCrop so it fits my width.In my Android version all I need to do is this android:scaleType="centerCrop" and this is the result. However, in IOS I am calling Content mode = Center but this is the result How do I get the same result in my IOS that I have in Android. Note I am using Swift 4.2

Android- android:scaleType="centerCrop"

enter image description here

IOS

enter image description here

ADM
  • 20,406
  • 11
  • 52
  • 83
user1163234
  • 2,407
  • 6
  • 35
  • 63

1 Answers1

2

For iOS the scaleTypes you are looking for is UIViewContentModeScaleAspectFill.

See Difference between UIViewContentModeScaleAspectFit and UIViewContentModeScaleToFill?

Ge3ng
  • 1,875
  • 1
  • 24
  • 38