burstSelectionTypes
burstSelectionTypes
burstSelectionTypes Instance Property of PHAsset The selection type of the asset in a burst photo sequence.
var burstSelectionTypes: PHAssetBurstSelectionType { get }Discussion
When the user takes a sequence of photos in burst mode with the Camera app (on supported devices), the Photos app user interface groups the resulting assets together and allows the user to select favorite members of the sequence. Photos also automatically marks members of the sequence as potential user favorites. See PHAssetBurstSelectionType for possible values.
Because an asset may have more than one selection type, you use bit masks to identify an asset. For example, the code below tests an asset’s selection type.
if (burstSelectionTypes.rawValue == (PHAssetBurstSelectionType.autoPick.rawValue | PHAssetBurstSelectionType.userPick.rawValue)) {
print("Display two badges in the user interface.")
} else if (burstSelectionTypes == .autoPick) {
print("Display an auto-selected badge in the user interface.")
} else if (burstSelectionTypes == .userPick) {
print("Display a user-selected badge in the user interface.")
}