FilterSelectionController

@available(iOS 9.0, *)
@objcMembers
@objc(PESDKFilterSelectionController)
open class FilterSelectionController : NSObject
extension FilterSelectionController: UICollectionViewDataSource
extension FilterSelectionController: UICollectionViewDelegate
extension FilterSelectionController: UICollectionViewDelegateFlowLayout

A FilterSelectionController contains everything that is needed to display a list of available filters.

Properties

  • 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)?

Initializers

  • 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.