FUICheckoutIndicatorView
open class FUICheckoutIndicatorView : NibDesignable
FUICheckoutIndicatorView
is an IBDesignable UI component.
It uses two distinct states to display either a (download) progress or a completed
status.
You can change between the displayed states by modifying the displayState
property.
Initialization
Programmatically:
let checkoutIndicatorView = FUICheckoutIndicatorView(frame: CGRect())
Inside a Storyboard or xib:
- Drag and drop a
UIView
component to Interface Builder’s canvas. - Switch custom class name from
UIView
toFUICheckoutIndicatorView
and 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 moreFUICheckoutIndicatorView
can have.Declaration
Swift
public enum DisplayState : Equatable
-
The current
DisplayState
of this checkout indicator. The initial value isDisplayState.processing
. Changing the displayState property will trigger a redraw of the view.Declaration
Swift
public private(set) var displayState: FUICheckoutIndicatorView.DisplayState
-
Changes the display state of this view. This changes the visual appearance of the view.
Declaration
Swift
public func changeDisplayState(to newState: DisplayState, completion: (() -> Void)? = nil)
Parameters
newState
the new display state to switch to.
completion
completion handler that will be called, once the display state change is done.