RSDCountdownStepViewController

open class RSDCountdownStepViewController : RSDFullscreenImageStepViewController

RSDCountdownStepViewController is a simple countdown timer for displaying a short duration (5-4-3-2-1) countdown.

This view controller includes a default nib implementation that is included in this framework. It includes a countdownLabel that can be used to show a numeric countdown (5-4-3-2-1) and a pauseButton that can be used to pause the countdown timer.

Seealso

RSDTaskViewController.vendDefaultViewController(for:)
  • A label that is updated to show a countdown (5-4-3-2-1).

    Declaration

    Swift

    @IBOutlet
    open var countdownLabel: UILabel?
  • A button that can be used to pause/resume the countdown timer.

    Declaration

    Swift

    @IBOutlet
    open var pauseButton: UIButton?
  • This class overrides didSet to update the countdownLabel to the new value.

    Declaration

    Swift

    override open var countdown: Int { get set }
  • Toggle the state of the pauseButton to pause/resume the countdown.

    Declaration

    Swift

    @IBAction
    open func pauseTimer()
  • Override setting the color style to set the color of the label.

    Declaration

    Swift

    open override func setColorStyle(for placement: RSDColorPlacement, background: RSDColorTile)
  • Returns the color to use for the countdown label

    Declaration

    Swift

    open func countdownLabelColor(on background: RSDColorTile) -> UIColor
  • The default nib name to use when instantiating the view controller using init(step:).

    Declaration

    Swift

    open class var nibName: String { get }
  • The default bundle to use when instantiating the view controller using init(step:).

    Declaration

    Swift

    open class var bundle: Bundle { get }
  • Default initializer. This initializer will initialize using the nibName and bundle defined on this class.

    Declaration

    Swift

    public override init(step: RSDStep, parent: RSDPathComponent?)

    Parameters

    step

    The step to set for this view controller.

  • Initialize the class using the given nib and bundle.

    Note

    If this initializer is used with a nil nib, then it must assign the expected outlets.

    Declaration

    Swift

    public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?)

    Parameters

    nibNameOrNil

    The name of the nib or nil.

    nibBundleOrNil

    The name of the bundle or nil.

  • Required initializer. This is the initializer used by a UIStoryboard.

    Declaration

    Swift

    public required init?(coder aDecoder: NSCoder)

    Parameters

    aDecoder

    The decoder used to initialize this view controller.