FUIModalLoadingIndicatorView

open class FUIModalLoadingIndicatorView: NibDesignable

FUIModalLoadingIndicatorView shows a FUILoadingIndicatorView centered in a container area of the screen and disables interaction. The container can be either a view or a window.

By default, the loading indicator is shown centered on screen. The view is not visible and the animation is stopped until show() is called.

Initialization

let modalLoadingIndicatorView = FUIModalLoadingIndicatorView()

Usage

Show Fullscreen

modalLoadingIndicatorView.show()
// do something
modalLoadingIndicatorView.dismiss()

Show in View

let containerView = UIView()
modalLoadingIndicatorView.show(inView: containerView)
// do something
modalLoadingIndicatorView.dismiss()

  • Loading indicator that is centered in container.

    Declaration

    Swift

    @IBOutlet weak public var loadingIndicator: FUILoadingIndicatorView!
  • Text of loadingIndicator’s text label. The default is a localized version of LOADING.

    Declaration

    Swift

    public var text: String?
  • A boolean value that indicates whether the loading indicator is currently spinning.

    Declaration

    Swift

    public var isAnimating: Bool
  • Shows the loading indicator in the center of view and starts spinning the activity indicator.

    Declaration

    Swift

    open func show(inView view: UIView, animated: Bool = true)

    Parameters

    view

    the container view in which the loading indicator is centered.

    animated

    whether the loading indicator is shown with a fade animation. The default is true.

  • Dismisses the loading indicator and stops spinning the activity indicator.

    Declaration

    Swift

    open func dismiss()