FUICheckoutIndicatorView
@MainActor
open class FUICheckoutIndicatorView : NibDesignable
FUICheckoutIndicatorView is an IBDesignable UI component.
It uses three distinct states to indicate the progress of a download inProgress, along with completed or failed statuses. These states can be toggled by modifying the displayState property.
Initialization
Programmatically:
let checkoutIndicatorView = FUICheckoutIndicatorView(frame: CGRect())
Inside a Storyboard or xib:
- Drag and drop a
UIViewcomponent to Interface Builder’s canvas. - Switch custom class name from
UIViewtoFUICheckoutIndicatorViewand set module toSAPFiori. - Create an outlet of the FUICheckoutIndicatorView to be able to access its properties.
Usage
// After the checkout indicator view is shown, you might want to start a lengthy (download or finalization) process e.g. synchronize data.
// Once this process is complete, change the displayState to .completed and hide the view when the completion handler is called:
checkoutIndicatorView.state = .completed {
self.checkoutIndicatorView.isHidden = true
}
Theming
Supported style classes
fdlFUICheckoutIndicatorView
-
FUICheckoutIndicatorView.DisplayState is an enum that represents the different states a
See moreFUICheckoutIndicatorViewcan have.Declaration
Swift
public enum DisplayState : Equatable
-
Tint color for
completedstateDeclaration
Swift
@MainActor public var completedTintColor: UIColor { get set } -
Tint color for
failedstateDeclaration
Swift
@MainActor public var failedTintColor: UIColor { get set } -
Tint color for the AI in progress state
Declaration
Swift
@MainActor public var aiProgressTintColor: UIColor { get set } -
UIImage for the AI in progress state
Declaration
Swift
@MainActor public var aiProgressImage: UIImage? { get set } -
The current
DisplayStateof this checkout indicator. The initial value isDisplayState.processing. Changing the displayState property will trigger a redraw of the view.Declaration
Swift
@MainActor public private(set) var displayState: DisplayState { get } -
Changes the display state of this view. This changes the visual appearance of the view.
Declaration
Swift
@MainActor public func changeDisplayState(to newState: DisplayState, completion: (() -> Void)? = nil)Parameters
newStatethe new display state to switch to.
completioncompletion handler that will be called, once the display state change is done.