UIImageScaleMode

public enum UIImageScaleMode: Int

The UIImageScaleMode defines various modes available to scale the image.

  • Scales the image to fit the given size by maintaining the aspect ratio. Any remaining area will be blank.

    Declaration

    Swift

    case aspectFit
  • Scales the image to fill the given size by maintaining the aspect ratio. Some portion of the image may be clipped.

    Declaration

    Swift

    case aspectFill
  • Scales the image to fit the given size by changing the aspect ratio, if necessary.

    Declaration

    Swift

    case resize