Skip to content

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
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

  1. Drag and drop an UIView component to Interface Builder canvas.
  2. Switch class name from UIView to FUILoadingIndicatorView, and set module to SAPFiori.
  3. 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 the textLabel

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 of activityIndicator

Example Code

fdlFUILoadingIndicatorView_activityIndicator {
   color: blue;
}

Last update: April 14, 2021