FUIModalProcessingIndicatorView

open class FUIModalProcessingIndicatorView : NibDesignable

FUIModalProcessingIndicatorView shows a FUIProcessingIndicatorView centered in a container area of the screen and disables interaction. The container can be either a view or a window. An overlay is shown behind the processing indicator, which covers the whole container. The overlay can be either set to translucent white or to be using a UIVisualEffectView to achieve a blurred background.

By default, the processing indicator is shown centered on screen and shows a translucent white overlay. The view is not visible and the animation is stopped until show() is called.

To change the background mode to blurred, simply assign BackgroundMode.blurred to the backgroundMode property.

Initialization

let modalProcessingIndicatorView = FUIModalProcessingIndicatorView()

Usage

Show Fullscreen

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

Show in View

let containerView = UIView()
modalProcessingIndicatorView.show(inView: containerView)
// do something
modalProcessingIndicatorView.dismiss()
  • The visual style of the background overlay behind the processing indicator.

    See more

    Declaration

    Swift

    public enum BackgroundMode
  • Processing indicator that is centered in container.

    Declaration

    Swift

    @IBOutlet
    weak public private(set) var processingIndicator: FUIProcessingIndicatorView! { get }
  • The appearance of the background overlay behind the processing indicator. The default is .translucentWhite.

    Declaration

    Swift

    public var backgroundMode: BackgroundMode { get set }
  • Text of processingIndicator‘s text label. The default is nil.

    Declaration

    Swift

    @IBInspectable
    public var text: String? { get set }
  • A boolean value indicating whether the processing indicator is currently rotating.

    Declaration

    Swift

    public var isAnimating: Bool { get }
  • Shows the processing indicator in the center of view and starts rotating.

    Declaration

    Swift

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

    Parameters

    view

    the container view in which the processing indicator is centered.

    animated

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

  • Dismisses the processing indicator and stops rotating.

    Declaration

    Swift

    open func dismiss(animated: Bool = true)

    Parameters

    animated

    whether the processing indicator is dismissed with a fade animation. The default is true.