SpriteContainerView

@available(iOS 9.0, *)
@objcMembers
@objc(PESDKSpriteContainerView)
open class SpriteContainerView : UIView
extension SpriteContainerView: PhotoEditModelSettable

A SpriteContainerView is the parent view of SpriteViews. It is responsible for updating their position and size based on their normalized position and size and the size of the input image.

Properties

  • The size of the untransformed preview image. This is used to denormalize the normalized values.

    Declaration

    Swift

    open var referenceSize: CGSize { get set }
  • The size of the transformed preview image. This is used to calculate the position within the view.

    Declaration

    Swift

    open var currentSize: CGSize { get set }
  • The SpriteViews which have been added to the view.

    Declaration

    Swift

    open var sprites: [SpriteView] { get }
  • The photo edit model.

    Declaration

    Swift

    open var photoEditModel: PhotoEditModel { get set }
  • The scale factor that is needed to fit the transformed preview image into the view.

    Declaration

    Swift

    open var imageToViewScaleFactor: CGFloat { get }
  • This is a boxed property which exposes a Swift struct to Objective-C. This property should only be used if you are using Objective-C.

    Every invocation of the getter will return a new (temporary) object wrapping the underlying Swift struct. Boxed properties cannot be chained with the dot syntax for mutable access of nested properties in place. Use the setter with the assignment operator instead to modify boxed properties, e.g.:

    PESDKPhotoEditModel *photoEditModel = [[PESDKPhotoEditModel alloc] init];
    
    // CORRECT:
    // get boxed `AdjustmentModel`
    PESDKAdjustmentModel *adjustmentModel = photoEditModel.adjustmentModel;
    // modify boxed `AdjustmentModel`
    adjustmentModel.brightness = 0.5;
    // set modified boxed `AdjustmentModel`
    photoEditModel.adjustmentModel = adjustmentModel;
    
    // WRONG:
    photoEditModel.adjustmentModel.brightness = 0.5;
    

    Declaration

    Swift

    var boxedPhotoEditModel: _ObjCPhotoEditModel { get set }