NVActivityIndicatorView
public final class NVActivityIndicatorView : UIView
Activity indicator view with nice animations
-
Default type. Default value is .BallSpinFadeLoader.
Declaration
Swift
public static var DEFAULT_TYPE: NVActivityIndicatorType
-
Default color of activity indicator. Default value is UIColor.white.
Declaration
Swift
public static var DEFAULT_COLOR: UIColor
-
Default color of text. Default value is UIColor.white.
Declaration
Swift
public static var DEFAULT_TEXT_COLOR: UIColor
-
Default padding. Default value is 0.
Declaration
Swift
public static var DEFAULT_PADDING: CGFloat
-
Default size of activity indicator view in UI blocker. Default value is 60x60.
Declaration
Swift
public static var DEFAULT_BLOCKER_SIZE: CGSize
-
Default display time threshold to actually display UI blocker. Default value is 0 ms.
Note
Default time that has to be elapsed (between calls ofstartAnimating()
andstopAnimating()
) in order to actually display UI blocker. It should be set thinking about what the minimum duration of an activity is to be worth showing it to the user. If the activity ends before this time threshold, then it will not be displayed at all.Declaration
Swift
public static var DEFAULT_BLOCKER_DISPLAY_TIME_THRESHOLD: Int
-
Default minimum display time of UI blocker. Default value is 0 ms.
Note
Default minimum display time of UI blocker. Its main purpose is to avoid flashes showing and hiding it so fast. For instance, setting it to 200ms will force UI blocker to be shown for at least this time (regardless of callingstopAnimating()
ealier).Declaration
Swift
public static var DEFAULT_BLOCKER_MINIMUM_DISPLAY_TIME: Int
-
Default message displayed in UI blocker. Default value is nil.
Declaration
Swift
public static var DEFAULT_BLOCKER_MESSAGE: String?
-
Default message spacing to activity indicator view in UI blocker. Default value is 8.
Declaration
Swift
public static var DEFAULT_BLOCKER_MESSAGE_SPACING: CGFloat
-
Default font of message displayed in UI blocker. Default value is bold system font, size 20.
Declaration
Swift
public static var DEFAULT_BLOCKER_MESSAGE_FONT: UIFont
-
Default background color of UI blocker. Default value is UIColor(red: 0, green: 0, blue: 0, alpha: 0.5)
Declaration
Swift
public static var DEFAULT_BLOCKER_BACKGROUND_COLOR: UIColor
-
Default fade in animation.
Declaration
Swift
public static var DEFAULT_FADE_IN_ANIMATION: FadeInAnimation
-
Default fade out animation.
Declaration
Swift
public static var DEFAULT_FADE_OUT_ANIMATION: FadeOutAnimation
-
Animation type.
Declaration
Swift
public var type: NVActivityIndicatorType
-
Color of activity indicator view.
Declaration
Swift
@IBInspectable public var color: UIColor
-
Padding of activity indicator view.
Declaration
Swift
@IBInspectable public var padding: CGFloat
-
Current status of animation, read-only.
Declaration
Swift
@available(*, deprecated) public var animating: Bool { get }
-
Current status of animation, read-only.
Declaration
Swift
private(set) public var isAnimating: Bool
-
Returns an object initialized from data in a given unarchiver. self, initialized using the data in decoder.
Declaration
Swift
public required init?(coder aDecoder: NSCoder)
Parameters
decoder
an unarchiver object.
Return Value
self, initialized using the data in decoder.
-
Create a activity indicator view.
Appropriate NVActivityIndicatorView.DEFAULT_* values are used for omitted params.
Declaration
Swift
public init(frame: CGRect, type: NVActivityIndicatorType? = nil, color: UIColor? = nil, padding: CGFloat? = nil)
Parameters
frame
view’s frame.
type
animation type.
color
color of activity indicator view.
padding
padding of activity indicator view.
Return Value
The activity indicator view.
-
Returns the natural size for the receiving view, considering only properties of the view itself.
A size indicating the natural size for the receiving view based on its intrinsic properties.
Declaration
Swift
public override var intrinsicContentSize: CGSize { get }
Return Value
A size indicating the natural size for the receiving view based on its intrinsic properties.
-
Undocumented
Declaration
Swift
public override var bounds: CGRect { get set }
-
Start animating.
Declaration
Swift
public final func startAnimating()
-
Stop animating.
Declaration
Swift
public final func stopAnimating()