This is v9.4 of the developer resources that can be found under Start, Develop, Deploy, Operate, Customize and Reference sections, except with references to the Nok Nok S3 Suite instead of the DigipassONE Platform.

Replacing the Progress Indicator UI

Prev Next

The App SDK provides a default Progress Indicator.

To provide your own Progress Indicator, take the following steps:

Step 1. Create a class for your custom progress indicator which adopts the IndicatorListenerDelegate protocol. For example, call this class SampleIndicatorListener. To satisfy the protocol, implement these three methods:

class SampleIndicatorListener : IndicatorListenerDelegate {
    func changeIndicatorVisibility(_ show: Bool) {
        // Called when the SDK needs to show or dismiss the indicator.
        // Add your implementation here.
    }
    func onSuspend() {
        // Called when the SDK needs to suspend the indicator.
        // Add your implementation here.
    }
    func onResume() {
        // Called when the SDK needs to resume the indicator.
        // Add your implementation here.
    }
}

Step 2. Set your SampleIndicatorListener object to be the listener for the ProgressIndicator.

// Create the instance of your custom indicator listener.
var indicatorListener = SampleIndicatorListener()
// Set the instance of your listener to the ProgressIndicator.
ProgressIndicator.setListener(indicatorListener)

Working Example in Tutorial App

Refer to the following file for an example of customizing this UI:

  • SampleIndicatorListener.swift