Loading Indicator View¶
FUILoadingIndicatorView
¶
open class FUILoadingIndicatorView: NibDesignable
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.
1 |
|
Initialization¶
Programmatically¶
let loadingIndicatorView = FUILoadingIndicatorView(frame: CGRect())
Inside a Storyboard or Xib
¶
- Drag and drop an
UIView
component to Interface Builder canvas. - Switch class name from
UIView
toFUILoadingIndicatorView
, 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¶
swift
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;
}