FilterSelectionController
@objc(PESDKFilterSelectionController) open class FilterSelectionController: NSObject
A FilterSelectionController
contains everything that is needed to display a list of available filters.
-
The collection view that presents all available filters.
Declaration
Swift
open let collectionView: UICollectionView
-
This block is called when a new photo effect is selected.
Declaration
Swift
open var selectedBlock: ((PhotoEffect) -> Void)?
-
This block is used to determine the currently applied photo effect.
Declaration
Swift
open var activePhotoEffectBlock: (() -> (PhotoEffect?))?
-
This block is used to configure the filter collection view cell.
Declaration
Swift
open var cellConfigurationClosure: ((FilterCollectionViewCell, PhotoEffect) -> Void)?
-
Returns a newly allocated instance of a
FilterSelectionController
using the given input image.Declaration
Swift
public init(inputImage: UIImage?)
Parameters
inputImage
The input image that should be used to preview the filters.
Return Value
An instance of a
FilterSelectionController
. -
Updates the cell selection based on the
activePhotoEffectBlock
.Declaration
Swift
open func updateSelection(animated: Bool)
Parameters
animated
If
true
the selection will be animated.