0

Can iOS set scale before load image?

Just like Android "Glide", auto resize image to fit layout.

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Water Magical
  • 979
  • 1
  • 9
  • 13

1 Answers1

0

Yes, you can set an image to scale to fit the view before it's loaded. You do this by setting by setting constraints on the view that will be displaying the image, typically a UIImageView.

You can set the constraints in Interface Builder, or refer to this answer for ways to do it programmatically in your code.

Community
  • 1
  • 1
Robert
  • 6,660
  • 5
  • 39
  • 62