FUILoadingIndicatorView
@MainActor
open class FUILoadingIndicatorView : UIStackView
FUILoadingIndicatorView is an IBdesignable UI component. A loading indicator shows that something is currently in progress. It shows a UIActivityIndicatorView to visualize progress and a UILabel indicating to the user what is in progress.
By default, this view is visible and the animation is stopped. To start the animation call `startAnimating()`.
## Initialization ### Programmatically:
let loadingIndicatorView = FUILoadingIndicatorView(frame: CGRect())
### Inside a Storyboard or xib:
- Drag and drop an
UIViewcomponent to Interface Builder canvas. - Switch class name from
UIViewtoFUILoadingIndicatorView, and set module toSAPFiori. - Create an outlet of the loading indicator to be able to access its properties.
## Usage
loadingIndicatorView.show()
// do something
loadingIndicatorView.dismiss()
## Animation The animation of the activity indicator can be started or stopped without affecting the visibility of the view.
loadingIndicatorView.startAnimating()
// do something
loadingIndicatorView.stopAnimating()
## Theming
The styleClass of the view is fdlFUILoadingIndicatorView.
In the .nss file you can use the following parameters:
fdlFUILoadingIndicatorView_textLabel: changes the appearance of thetextLabel
### Example:
fdlFUILoadingIndicatorView_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;
}
fdlFUILoadingIndicatorView_activityIndicator: changes the appearance ofactivityIndicator
### Example code:
fdlFUILoadingIndicatorView_activityIndicator {
color: blue;
}
-
Activity indicator that is either spinning or stopped.
Declaration
Swift
@MainActor public private(set) var activityIndicator: UIActivityIndicatorView { get } -
UIImage for the AI progress indicator
Declaration
Swift
@MainActor public var aiProgressImage: UIImage? { get set } -
Text label below the activity indicator.
Declaration
Swift
@MainActor public private(set) var textLabel: UILabel { get } -
Text of
textLabel. The default is a localized version ofLOADING.Declaration
Swift
@IBInspectable @MainActor public var text: String? { get set } -
A boolean value that indicates whether the activity indicator is currently spinning.
Declaration
Swift
@MainActor public var isAnimating: Bool { get } -
Boolean value to indicate whether the loading indicator is AI in progress style.
The defalt value is false
Declaration
Swift
@MainActor public var isAIEnabled: Bool { get set } -
Use instead of
self.traitCollection.horizontalSizeClass, to support multi-tasking mode on iPad correctlyDeclaration
Swift
@MainActor open var isCompact: Bool { get } -
layout variant, default .vertical
Declaration
Swift
@MainActor open var type: NSLayoutConstraint.Axis { get set } -
Shows the loading indicator and starts spinning the activity indicator.
Declaration
Swift
@MainActor open func show(animated: Bool = true)Parameters
animatedwhether the loading indicator is shown with a fade animation.
-
Dismisses the loading indicator and stops spinning the activity indicator.
Declaration
Swift
@MainActor open func dismiss() -
Starts the spinning animation of the activity indicator until it is stopped.
Declaration
Swift
@MainActor open func startAnimating() -
Stops the spinning animation of the activity indicator.
Declaration
Swift
@MainActor open func stopAnimating()