Skip to content

Initializer

init(title:titleAfterIndicator:frames:success:failure:)

Creates a new CustomActivity instance.
init(title: String, titleAfterIndicator: Bool = true, frames: [ConsoleText], success: String = "[Done]", failure: String = "[Failed]")

Parameters

title

The title of the activity indicator.

titleAfterIndicator

If true, the title of the activity indicator will be printed after the indicator itself.

frames

The text to loop over as the activity indicator runs.

success

The string to replace the indicator with when the operation succeeds. The default value is [Done].

failure

The string to replace the indicator with when the operation fails: The default value is [Failed].