Instance Method

setAssetsFilter(_:)

Sets the filter for the group.

Declaration

func setAssetsFilter(_ filter: ALAssetsFilter!)

Parameters

filter

The filter for the group.

Discussion

This method sets the filter the group; it does not execute the filter. The filter is applied when you invoke numberOfAssets() or enumerate the contents.

If you don’t set the filter, or set it to nil, the enumeration returns all the assets in the group.

Special Considerations

Only one filter is active at a time. Any enumeration currently in flight continues to completion using the previous filter.

See Also

Filtering

func numberOfAssets() -> Int

Returns the number of assets in the group that match the current filter.

Deprecated