FUIProcessingIndicatorView
@MainActor
open class FUIProcessingIndicatorView : NibDesignable
FUIProcessingIndicatorView is an IBDesignable UI component. A processing indicator shows that a task is in progress. It shows a circular activity indicator to visualize indeterminate processing and has an optional UILabel below the activity indicator indicating to the user what is being processed.
By default, this view is not visible and the animation is stopped. The activity indicator has a predefined size and line width that depends on the horizontal size class.
Initialization
Programmatically:
let processingIndicatorView = FUIProcessingIndicatorView(frame: CGRect())
Inside a Storyboard or xib:
- Drag and drop a
UIViewcomponent to Interface Builder’s canvas. - Switch class name from
UIViewtoFUIProcessingIndicatorView, and set module toSAPFiori. - Create an outlet of the processing indicator view to be able to access its properties.
Usage
processingIndicatorView.show()
// do something
processingIndicatorView.dismiss()
Animation
The animation of the processing indicator can be started or stopped without affecting the visibility of the view.
processingIndicatorView.startAnimating()
// do something
processingIndicatorView.stopAnimating()
Theming
The styleClass of the view is fdlFUIProcessingIndicatorView.
In the .nss file you can use the following parameters:
fdlFUIProcessingIndicatorView_textLabel: changes the appearance of thetextLabel
Example:
fdlFUIProcessingIndicatorView_textLabel {
background-color: red;
border-color: green;
border-width: 2;
corner-radius: 2;
font-color: blue;
font-color-highlighted: yellow;
font-name: Avenir;
font-size: 15;
height: 50;
shadow-color: black;
shadow-offset: 1, 2;
shadow-opacity: 0.5;
shadow-radius: 2;
text-align: center;
text-alpha: 0.9;
text-auto-fit: true;
text-shadow-color: black;
text-shadow-offset: 1, 2;
text-transform: uppercase;
text-line-clamp:6;
width: 100;
}
-
Text label below the circular activity indicator.
Declaration
Swift
@IBOutlet @MainActor weak public var textLabel: UILabel! -
Text of
textLabel. The default isnil.Declaration
Swift
@IBInspectable @MainActor public var text: String? { get set } -
A boolean value indicating whether
textLabelis hidden. The default isfalse.Declaration
Swift
@IBInspectable @MainActor public var isTextLabelHidden: Bool { get set } -
A boolean value indicating whether the processing indicator is currently rotating.
Declaration
Swift
@MainActor public var isAnimating: Bool { get } -
Shows the processing indicator and starts rotating.
Declaration
Swift
@MainActor open func show(animated: Bool = true)Parameters
animatedwhether the processing indicator is shown with a fade animation. The default is
true. -
Dismisses the processing indicator and stops rotating.
Declaration
Swift
@MainActor open func dismiss(animated: Bool = true)Parameters
animatedwhether the processing indicator is dismissed with a fade animation. The default is
true. -
Starts the rotation animation until it is stopped.
Declaration
Swift
@MainActor open func startAnimating(easeIn: Bool = true)Parameters
easeInwhether the circle starts rotating slowly and accelerates. The default is
true. -
Stops the rotation animation.
Declaration
Swift
@MainActor open func stopAnimating(easeOut: Bool = true)Parameters
easeOutwhether the circle rotation slows down before stopping. The default is
true.