Skip to content

Commit

Permalink
Update README for version 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ninjaprox committed Dec 24, 2015
1 parent 2f20dee commit 95b0584
Showing 1 changed file with 53 additions and 7 deletions.
60 changes: 53 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ Firstly, import NVActivityIndicatorView
import NVActivityIndicatorView
```

## Initialization

Then, there are multiple ways you can create NVActivityIndicatorView:

- Use it in storyboard by changing class of any `UIView` to `NVActivityIndicatorView`
Expand All @@ -82,41 +84,85 @@ NVActivityIndicatorView(frame: frame, type: type, color: color, size: size)
Any 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.
Therefore, you can also create NVActivityIndicatorView using any of the following:

- specify only frame, type and color
- Specify only frame, type and color
```swift
NVActivityIndicatorView(frame: frame, type: type, color: color)
```

- specify only frame, type and size
- Specify only frame, type and size
```swift
NVActivityIndicatorView(frame: frame, type: type, size: size)
```

- specify only frame, size and color
- Specify only frame, size and color
```swift
NVActivityIndicatorView(frame: frame, size: size, color: color)
```

- specify only frame and type
- Specify only frame and type
```swift
NVActivityIndicatorView(frame: frame, type: type)
```

- specify only frame and color
- Specify only frame and color
```swift
NVActivityIndicatorView(frame: frame, color: color)
```

- specify only frame and size
- Specify only frame and size
```swift
NVActivityIndicatorView(frame: frame, size: size)
```

- specify only frame
- Specify only frame
```swift
NVActivityIndicatorView(frame: frame)
```

## Start/Stop animation

Start animation

```swift
activityIndicatorView.startAnimation()
```

Stop animation

```swift
activityIndicatorView.stopAnimation()
```

## Change properties

Specify individual properties after initialization:

- Specify type
```swift
activityIndicatorView.type = .LineScale
```

- Specify color
```swift
activityIndicatorView.color = UIColor.redColor()
```

- Specify size
```swift
activityIndicatorView.size = CGSize(width: 100, height: 100)
```

Specify whether activity indicator view should hide once stopped

```swift
activityIndicatorView.hidesWhenStopped = true
```

Get current status of animation
```swift
animation = activityIndicatorView.animating
```

# Acknowledgment

Thanks [Connor Atherton](https://github.com/ConnorAtherton) for great loaders and [Danil Gontovnik](https://github.com/gontovnik) for kick-start.
Expand Down

0 comments on commit 95b0584

Please sign in to comment.