The subtypes of the asset, identifying special kinds of assets such as panoramic photo or high-framerate video.
SDKs
- iOS 8+
- macOS 10.13+
- Mac Catalyst 13.0+
- tvOS 10+
Framework
- Photos
Declaration
var mediaSubtypes: PHAsset Media Subtype { get }
Discussion
See PHAsset
for possible values.
Because an asset may have more than one subtype, you use these values as bit masks to identify an asset. For example, the code below tests an asset for the panorama photo subtype:
if (asset.mediaType == PHAssetMediaTypeImage && (asset.mediaSubtypes & PHAssetMediaSubtypePhotoHDR)) {
// display HDR badge in UI
}