InstructionsCardContainerViewDelegate
public protocol InstructionsCardContainerViewDelegate : VisualInstructionDelegate
The InstructionsCardContainerViewDelegate
protocol defines a method that allows an object to customize presented visual instructions within the instructions container view.
-
primaryLabel(_:willPresent:as:)
Default implementationCalled 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 implementationCalled 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.