VisualInstructionDelegate

@objc(MBVisualInstructionDelegate)
public protocol VisualInstructionDelegate : AnyObject

The VisualInstructionDelegate protocol defines a method that allows an object to customize presented visual instructions.

  • Called when an InstructionLabel will present a visual instruction.

    Declaration

    Swift

    @objc(label:willPresentVisualInstruction:asAttributedString:)
    optional func label(_ label: InstructionLabel, willPresent instruction: VisualInstruction, as presented: NSAttributedString) -> NSAttributedString?

    Parameters

    label

    The label that the instruction will be presented on.

    instruction

    the VisualInstruction that will be presented.

    presented

    the formatted string that is provided by the instruction presenter

    Return Value

    optionally, a customized NSAttributedString that will be presented instead of the default, or if nil, the default behavior will be used.