Digipass S3 is now DigipassONE. This section is currently being updated to reflect our new name.

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