SnappingOptionsBuilder

@available(iOS 9.0, *)
@objcMembers
@objc(PESDKSnappingOptionsOptionsBuilder)
open class SnappingOptionsBuilder : NSObject

The default SnappingOptionsBuilder for SnappingOptions.

  • Whether user interface objects should snap to specific positions and/or orientations during pan or rotation interactions. This switch enables or disables any snapping at all. The detailed snapping behavior can be configured with the snapTo* configuration options. Snapping is enabled by default.

    Declaration

    Swift

    open var snappingEnabled: Bool
  • Enabled snapping angles in degrees for rotating a sprite. The rotation angle is defined clockwise. The default value is [0, 45, 90, 135, 180, 225, 270, 315].

    Note

    snappingEnabled must be set to true otherwise this option is ignored.

    Declaration

    Swift

    open var snapToAngles: [Int]
  • If enabled a sprite’s center snaps to the horizontal line through the center of the edited image. The default value is true.

    Note

    snappingEnabled must be set to true otherwise this option is ignored.

    Declaration

    Swift

    open var snapToHorizontalCenterLine: Bool
  • If enabled a sprite’s center snaps to the vertical line through the center of the edited image. The default value is true.

    Note

    snappingEnabled must be set to true otherwise this option is ignored.

    Declaration

    Swift

    open var snapToVerticalCenterLine: Bool
  • If not nil the left side of a sprite’s bounding box snaps to a vertical line which is shifted by this value from the left side of the edited image towards its center. This value is measured in normalized coordinates relative to the smaller side of the edited image. The default value is 0.1.

    Note

    snappingEnabled must be set to true otherwise this option is ignored.

    Declaration

    Swift

    open var snapToLeft: CGFloat?
  • If not nil the right side of a sprite’s bounding box snaps to a vertical line which is shifted by this value from the right side of the edited image towards its center. This value is measured in normalized coordinates relative to the smaller side of the edited image. The default value is 0.1.

    Note

    snappingEnabled must be set to true otherwise this option is ignored.

    Declaration

    Swift

    open var snapToRight: CGFloat?
  • If not nil the top side of a sprite’s bounding box snaps to a horizontal line which is shifted by this value from the top side of the edited image towards its center. This value is measured in normalized coordinates relative to the smaller side of the edited image. The default value is 0.1.

    Note

    snappingEnabled must be set to true otherwise this option is ignored.

    Declaration

    Swift

    open var snapToTop: CGFloat?
  • If not nil the bottom side of a sprite’s bounding box snaps to a horizontal line which is shifted by this value from the bottom side of the edited image towards its center. This value is measured in normalized coordinates relative to the smaller side of the edited image. The default value is 0.1.

    Note

    snappingEnabled must be set to true otherwise this option is ignored.

    Declaration

    Swift

    open var snapToBottom: CGFloat?
  • If not nil the left side of a sprite’s bounding box snaps to a vertical line which is shifted by this value from the left side of the edited image towards its center. This value is measured in normalized coordinates relative to the smaller side of the edited image. The default value is 0.1.

    Note

    snappingEnabled must be set to true otherwise this option is ignored.

    Declaration

    Swift

    @objc(snapToLeft)
    open var _objCSnapToLeft: NSNumber? { get set }
  • If not nil the right side of a sprite’s bounding box snaps to a vertical line which is shifted by this value from the right side of the edited image towards its center. This value is measured in normalized coordinates relative to the smaller side of the edited image. The default value is 0.1.

    Note

    snappingEnabled must be set to true otherwise this option is ignored.

    Declaration

    Swift

    @objc(snapToRight)
    open var _objCSnapToRight: NSNumber? { get set }
  • If not nil the top side of a sprite’s bounding box snaps to a horizontal line which is shifted by this value from the top side of the edited image towards its center. This value is measured in normalized coordinates relative to the smaller side of the edited image. The default value is 0.1.

    Note

    snappingEnabled must be set to true otherwise this option is ignored.

    Declaration

    Swift

    @objc(snapToTop)
    open var _objCSnapToTop: NSNumber? { get set }
  • If not nil the bottom side of a sprite’s bounding box snaps to a horizontal line which is shifted by this value from the bottom side of the edited image towards its center. This value is measured in normalized coordinates relative to the smaller side of the edited image. The default value is 0.1.

    Note

    snappingEnabled must be set to true otherwise this option is ignored.

    Declaration

    Swift

    @objc(snapToBottom)
    open var _objCSnapToBottom: NSNumber? { get set }