MutatorLayout

@objcMembers open class MutatorLayout: Layout

Abstract class for storing information on how to perform mutations for a Mutator, while still maintaining the block layout hierarchy.

  • The target Mutator to layout

    Declaration

    Swift

    public final let mutator: Mutator
  • A workspace layout coordinator used for executing workspace-level operations related to this mutator.

    Declaration

    Swift

    open weak var layoutCoordinator: WorkspaceLayoutCoordinator?
  • Flag determining if user interaction should be enabled for the corresponding view.

    Declaration

    Swift

    public var userInteractionEnabled: Bool
  • Performs any work required to maintain the integrity of the layout hierarchy, in addition to calling mutator.mutateBlock().

    This is where pre-/post- mutation work should be handled.

    Note

    This method needs to be implemented by a subclass of MutatorLayout.

    Declaration

    Swift

    open func performMutation() throws
  • Updates the mutator from XML and immediately performs a mutation by calling performMutation().

    Throws

    BlocklyError: Thrown if the mutation could not be performed.

    Declaration

    Swift

    open func performMutation(fromXML xml: AEXMLElement) throws