Enumeration

PHImageContentMode

Options for fitting an image’s aspect ratio to a requested size, used by the requestImage(for:targetSize:contentMode:options:resultHandler:) method.

Declaration

enum PHImageContentMode : Int

Overview

With either option, the resulting image may not exactly match the target size, depending on the deliveryMode and resizeMode properties of the image request. To serve your request more quickly, Photos may provide a slightly larger image—one that it can generate more easily or one that is already cached.

Topics

Constants

static var `default`: PHImageContentMode

Fits the image to the requested size using the default option, PHImageContentMode.aspectFit.

case aspectFit

Scales the image so that its larger dimension fits the target size.

case aspectFill

Scales the image so that it completely fills the target size.