6

How can I move the image to the right?

img.contentMode = .scaleAspectFit

Example:

enter image description here

Powkachu
  • 2,170
  • 2
  • 26
  • 36
Bartek
  • 111
  • 7
  • 1
    This is a bit awkward actually and won't work out of the box. You can potentially do this using constraints and wrapping the image in a uiview. Otherwise perhaps this open source will help [UIImageViewAligned](https://github.com/sochalewski/UIImageViewAlignedSwift) – quin Jun 22 '18 at 12:51

0 Answers0