NVActivityIndicatorViewable
public protocol NVActivityIndicatorViewable
UIViewController conforms this protocol to be able to display NVActivityIndicatorView as UI blocker.
This extends abilities of UIViewController to display and remove UI blocker.
-
isAnimating
Extension methodCurrent status of animation, read-only.
Declaration
Swift
var isAnimating: Bool { get }
-
startAnimating(_:message:messageFont:type:color:padding:displayTimeThreshold:minimumDisplayTime:backgroundColor:textColor:fadeInAnimation:)
Extension methodDisplay UI blocker.
Appropriate NVActivityIndicatorView.DEFAULT_* values are used for omitted params.
Declaration
Swift
public func startAnimating( _ size: CGSize? = nil, message: String? = nil, messageFont: UIFont? = nil, type: NVActivityIndicatorType? = nil, color: UIColor? = nil, padding: CGFloat? = nil, displayTimeThreshold: Int? = nil, minimumDisplayTime: Int? = nil, backgroundColor: UIColor? = nil, textColor: UIColor? = nil, fadeInAnimation: FadeInAnimation? = NVActivityIndicatorView.DEFAULT_FADE_IN_ANIMATION)
Parameters
size
size of activity indicator view.
message
message displayed under activity indicator view.
messageFont
font of message displayed under activity indicator view.
type
animation type.
color
color of activity indicator view.
padding
padding of activity indicator view.
displayTimeThreshold
display time threshold to actually display UI blocker.
minimumDisplayTime
minimum display time of UI blocker.
fadeInAnimation
fade in animation.
-
stopAnimating(_:)
Extension methodRemove UI blocker.
Declaration
Swift
public func stopAnimating(_ fadeOutAnimation: FadeOutAnimation? = NVActivityIndicatorView.DEFAULT_FADE_OUT_ANIMATION)
Parameters
fadeOutAnimation
fade out animation.