NatProgressIndicatorCircular
public class NatProgressIndicatorCircular : UIView
NatProgressIndicatorCircular is a class that represents progress indicator circular component from the Design System. The component colors changes according to the current theme configured in the Design System.
The size and background can be set at init()
. The component is already animating when it appears on the screen.
The component has 2 actions:
startAnimation()
, which shows the animated progress indicatorstopAnimation()
, which hides the progress indicator
Example of usage:
let progressIndicator = NatProgressIndicator(size: .semi, backgroundLayer: true)
Requires
It’s necessary to configure the Design System with a theme or fatalError will be raised.
DesignSystem().configure(with: AvailableTheme)
-
Undocumented
Declaration
Swift
public init(size: NatProgressIndicatorCircular.Size = .medium, backgroundLayer: Bool = false, theme: AvailableTheme = .none)
-
Starts the circle animation
Declaration
Swift
public func startAnimation()
-
Stops the circle animation and hides the progress indicator
Declaration
Swift
public func stopAnimation()
-
Sets a background layer for the component
Declaration
Swift
public func configure(useBackgroundLayer: Bool)
Parameters
useBackgroundLayer
a boolean that indicates if the component should have a background layer
-
Undocumented
Declaration
Swift
override public func layoutSubviews()
-
Undocumented
See moreDeclaration
Swift
public enum Size : CGFloat