Instance Property


The subtypes of the asset, identifying special kinds of assets such as a panoramic photo or a high-frame-rate video.


var mediaSubtypes: PHAssetMediaSubtype { get }


See PHAssetMediaSubtype for possible values.

Because an asset can have more than one subtype, use these values as bit masks to identify an asset. For example, the code below tests an asset for the panorama photo subtype.

if (contentEditingInput.mediaType == PHAssetMediaTypeImage
    && (contentEditingInput.mediaSubtypes & PHAssetMediaSubtypePhotoHDR)) {
    // display HDR badge in UI

See Also

Getting Information About the Asset

var mediaType: PHAssetMediaType

The type of the asset, such as video or audio.

enum PHAssetMediaType

Constants identifying the general type of an asset, such as image or video.

struct PHAssetMediaSubtype

Constants identifying specific variations of asset media, such as panorama or screenshot photos and time lapse or high frame rate video.

var creationDate: Date?

The date and time when the asset was originally created.

var location: CLLocation?

The location information that was saved with the asset.

var uniformTypeIdentifier: String?

The uniform type identifier for the asset’s image or video data.