VisualInstructionDelegate
public protocol VisualInstructionDelegate : AnyObject, UnimplementedLogging
The VisualInstructionDelegate protocol defines a method that allows an object to customize
presented visual instructions.
-
label(_:willPresent:as:)Default implementationCalled when an InstructionLabel will present a visual instruction.
Default Implementation
UnimplementedLoggingprints a warning to standard output the first time this method is called.Declaration
Swift
func label(_ label: InstructionLabel, willPresent instruction: VisualInstruction, as presented: NSAttributedString) -> NSAttributedString?Parameters
labelThe label that the instruction will be presented on.
instructionThe
VisualInstructionthat will be presented.presentedThe 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.
Install in Dash
VisualInstructionDelegate Protocol Reference