UIImage - Content mode fit and right position - Swift 4
Asked Answered
L

0

8

How can I move the image to the right?

img.contentMode = .scaleAspectFit

Example:

enter image description here

Leprous answered 22/6, 2018 at 12:45 Comment(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 UIImageViewAlignedStroganoff

© 2022 - 2024 — McMap. All rights reserved.