.scaleToFill + .top : Scale to fill will fill the whole area of the `UIImageView`, so there is no point in doing + .top on it. If it were .aspectFit + .top, that'd make sense.
– LarmeFeb 26 '18 at 09:49
No, .scaleToFill fills the image in the image frame from the "center-center" point. You can imagine it when you compare that with the `background-position` property in CSS. Here you can combine 2 instructions as well. Example: `background-position: center top;`. In my case: I have an image with a person. If I select `.scaleToFill` the `UIImageView` will be filled correctly, but the face gonna cut off. With the CSS property it would be possible to scaleFill it from the center-top point. The face would going to be visible.
– SchmidtFxFeb 26 '18 at 12:16
@Deveesh A possible way is to use some third party library. Check out FaceAware, https://github.com/BeauNouvelle/FaceAware if it could solve your demand.
– SchmidtFxJul 01 '21 at 15:01