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.
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
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:
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:
fdlFUILoadingIndicatorView_activityIndicator {
color: blue;
}
-
Activity indicator that is either spinning or stopped.
Declaration
Swift
@IBOutlet weak public private(set) var activityIndicator: UIActivityIndicatorView!
-
Text label below the activity indicator.
Declaration
Swift
@IBOutlet weak public private(set) var textLabel: UILabel!
-
Text of
textLabel
. The default is a localized version ofLOADING
.Declaration
Swift
@IBInspectable public var text: String? { get set }
-
A boolean value that indicates whether the activity indicator is currently spinning.
Declaration
Swift
public var isAnimating: Bool { get }
-
Shows the loading indicator and starts spinning the activity indicator.
Declaration
Swift
open func show(animated: Bool = true)
Parameters
animated
whether the loading indicator is shown with a fade animation.
-
Dismisses the loading indicator and stops spinning the activity indicator.
Declaration
Swift
open func dismiss()
-
Starts the spinning animation of the activity indicator until it is stopped.
Declaration
Swift
open func startAnimating()
-
Stops the spinning animation of the activity indicator.
Declaration
Swift
open func stopAnimating()