SpriteViewController

@available(iOS 9.0, *)
@objc(PESDKSpriteViewController)
open class SpriteViewController : ViewController

A SpriteViewController is supposed to be added above a PhotoEditPreviewController. It uses the PhotoEditModel to display SpriteViews corresponding to SpriteModels and it reacts to changes in the PhotoEditModel by adding, changing or deleting SpriteViews.

  • Creates a new SpriteViewController object.

    Declaration

    Swift

    public required init(productType: LicenseProduct)

    Parameters

    productType

    The product that this sprite view controller is used in.

  • Called by a UITapGestureRecognizer to select a sprite. You shouldn’t need to call this method directly.

    Declaration

    Swift

    @objc
    open func tapped(_ gestureRecognizer: UITapGestureRecognizer)
  • Posts a .PESDKDidSelectSprite notification with the given SpriteView.

    Declaration

    Swift

    open func selectSpriteView(_ spriteView: SpriteView?)

    Parameters

    spriteView

    The sprite view that was selected or nil if no view was selected.

  • Returns the SpriteView at a given point, if any.

    Declaration

    Swift

    open func spriteView(at point: CGPoint) -> SpriteView?

    Parameters

    point

    The location to check for a sprite view.

    Return Value

    The sprite view at the given point or nil.

  • Returns the SpriteView with the given UUID, if any.

    Declaration

    Swift

    open func spriteView(with uuid: UUID) -> SpriteView?

    Parameters

    uuid

    The UUID of the sprite view.

    Return Value

    The sprite view with the UUID or nil.