@@ -68,6 +68,8 @@ Firstly, import NVActivityIndicatorView
6868import NVActivityIndicatorView
6969```
7070
71+ ## Initialization
72+
7173Then, there are multiple ways you can create NVActivityIndicatorView:
7274
7375- Use it in storyboard by changing class of any ` UIView ` to ` NVActivityIndicatorView `
@@ -82,41 +84,85 @@ NVActivityIndicatorView(frame: frame, type: type, color: color, size: size)
8284Any of the last three arguments can be omitted. If an argument is omitted it will use the default values which are 40, white, .Pacman for size, color and type respectively.
8385Therefore, you can also create NVActivityIndicatorView using any of the following:
8486
85- - specify only frame, type and color
87+ - Specify only frame, type and color
8688``` swift
8789NVActivityIndicatorView (frame : frame, type : type, color : color)
8890```
8991
90- - specify only frame, type and size
92+ - Specify only frame, type and size
9193``` swift
9294NVActivityIndicatorView (frame : frame, type : type, size : size)
9395```
9496
95- - specify only frame, size and color
97+ - Specify only frame, size and color
9698``` swift
9799NVActivityIndicatorView (frame : frame, size : size, color : color)
98100```
99101
100- - specify only frame and type
102+ - Specify only frame and type
101103``` swift
102104NVActivityIndicatorView (frame : frame, type : type)
103105```
104106
105- - specify only frame and color
107+ - Specify only frame and color
106108``` swift
107109NVActivityIndicatorView (frame : frame, color : color)
108110```
109111
110- - specify only frame and size
112+ - Specify only frame and size
111113``` swift
112114NVActivityIndicatorView (frame : frame, size : size)
113115```
114116
115- - specify only frame
117+ - Specify only frame
116118``` swift
117119NVActivityIndicatorView (frame : frame)
118120```
119121
122+ ## Start/Stop animation
123+
124+ Start animation
125+
126+ ``` swift
127+ activityIndicatorView.startAnimation ()
128+ ```
129+
130+ Stop animation
131+
132+ ``` swift
133+ activityIndicatorView.stopAnimation ()
134+ ```
135+
136+ ## Change properties
137+
138+ Specify individual properties after initialization:
139+
140+ - Specify type
141+ ``` swift
142+ activityIndicatorView.type = .LineScale
143+ ```
144+
145+ - Specify color
146+ ``` swift
147+ activityIndicatorView.color = UIColor.redColor ()
148+ ```
149+
150+ - Specify size
151+ ``` swift
152+ activityIndicatorView.size = CGSize (width : 100 , height : 100 )
153+ ```
154+
155+ Specify whether activity indicator view should hide once stopped
156+
157+ ``` swift
158+ activityIndicatorView.hidesWhenStopped = true
159+ ```
160+
161+ Get current status of animation
162+ ``` swift
163+ animation = activityIndicatorView.animating
164+ ```
165+
120166# Acknowledgment
121167
122168Thanks [ Connor Atherton] ( https://github.com/ConnorAtherton ) for great loaders and [ Danil Gontovnik] ( https://github.com/gontovnik ) for kick-start.
0 commit comments