InstructionsCardContainerViewDelegate

public protocol InstructionsCardContainerViewDelegate : VisualInstructionDelegate

The InstructionsCardContainerViewDelegate protocol defines methods that allow an object to customize presented visual instructions within the instructions container view.

  • primaryLabel(_:willPresent:as:) Default implementation

    Called when the Primary Label will present a visual instruction.

    Default Implementation

    UnimplementedLogging prints a warning to standard output the first time this method is called.

    Declaration

    Swift

    func primaryLabel(_ primaryLabel: InstructionLabel,
                      willPresent instruction: VisualInstruction,
                      as presented: NSAttributedString) -> NSAttributedString?

    Parameters

    primaryLabel

    The custom primary 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.

  • secondaryLabel(_:willPresent:as:) Default implementation

    Called when the Secondary Label will present a visual instruction.

    Default Implementation

    UnimplementedLogging prints a warning to standard output the first time this method is called.

    Declaration

    Swift

    func secondaryLabel(_ secondaryLabel: InstructionLabel,
                        willPresent instruction: VisualInstruction,
                        as presented: NSAttributedString) -> NSAttributedString?

    Parameters

    secondaryLabel

    The custom secondary 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.