EnlightenSpotlightControllerDelegate
@objc
public protocol EnlightenSpotlightControllerDelegate : AnyObject
Undocumented
-
Invoked before the controller shows a stage (Markdown string).
Declaration
Swift
@objc optional func spotlightControllerWillShow(stage: Int, in iris: EnlightenIris, navigating: EnlightenSpotlightController.NavigationDirection)Parameters
stageThe stage of the iris that will be shown. The stage index origin is one (i.e. the first stage is stage 1).
irisThe iris that the Markdown string belongs to.
navigatingThe direction of navigation, either forwards (showing the next stage) or backwards (showing the previous stage).
-
Invoked when the controller has finished dismissing.
Declaration
Swift
@objc optional func spotlightControllerDidDismiss() -
Invoked when a Markdown string fails to load, this method optionally returns a replacement.
If the delegate does not implement this method or returns nil, the spotlight stage is skipped.
Note
This delegate method should not be necessary if appropriate testing procedures are employed to ensure that all Markdown strings load successfully (i.e.
EnlightenSpotlightController.validateMarkdownStrings()testing method).Declaration
Swift
@objc optional func spotlightControllerFailedToLoad(markdownString: String, for iris: EnlightenIris, with error: Error) -> String?Parameters
markdownStringThe Markdown string that failed to load.
irisThe iris that the Markdown string belongs to.
downErrorThe error that was thrown.
Return Value
Optionally, a replacement Markdown string to use in place of the failed one.
EnlightenSpotlightControllerDelegate Protocol Reference