FilterSelectionController
@available(iOS 9.0, *)
@objcMembers
@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
public let collectionView: UICollectionView
-
This block is called when a new effect is selected.
Declaration
Swift
open var selectedBlock: ((Effect) -> Void)?
-
This block is used to determine the currently applied effect.
Declaration
Swift
open var activeEffectBlock: (() -> (Effect?))?
-
This block is used to configure the filter collection view cell.
Declaration
Swift
open var cellConfigurationClosure: ((MenuCollectionViewCell, Effect) -> Void)?
-
Creates a new instance of a
FilterSelectionController
using the given input image.Declaration
Swift
public convenience init(inputImage: UIImage?)
Parameters
inputImage
The input image that should be used to preview the filters.
-
Creates a new instance of a
FilterSelectionController
using the given input image and cell class.Declaration
Swift
public init(inputImage: UIImage?, cellClass: MenuCollectionViewCell.Type)
Parameters
inputImage
The input image that should be used to preview the filters.
cellClass
The type of cell that should be used.
-
Updates the cell selection based on the
activeEffectBlock
.Declaration
Swift
open func updateSelection(animated: Bool)
Parameters
animated
If
true
the selection will be animated.
-
This block is used to determine the currently applied photo effect.
Attention
This member is deprecated and will be removed in the future. It is only meant for backward compatibility. UseactiveEffectBlock
instead.Declaration
Swift
@available(*, deprecated, renamed: "activeEffectBlock") var activePhotoEffectBlock: (() -> (Effect?))? { get set }