# ActivityIndicatorView
**Repository Path**: greycode/ActivityIndicatorView
## Basic Information
- **Project Name**: ActivityIndicatorView
- **Description**: No description available
- **Primary Language**: Swift
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-07-15
- **Last Updated**: 2022-05-06
## Categories & Tags
**Categories**: Uncategorized
**Tags**: Swift, SwiftUI
## README
ActivityIndicatorView
A number of preset loading indicators created with SwiftUI
___
We are a development agency building
phenomenal apps.
[](https://travis-ci.org/exyte/ActivityIndicatorView)
[](http://cocoapods.org/pods/ActivityIndicatorView)
[](https://github.com/Carthage/Carthage)
[](http://cocoapods.org/pods/ActivityIndicatorView)
[](http://cocoapods.org/pods/ActivityIndicatorView)
[](http://twitter.com/exyteHQ)
# Usage
Create an indicator like this:
```swift
ActivityIndicatorView(isVisible: $showLoadingIndicator, type: .default)
```
where
`showLoadingIndicator` - bool value you may change to display or hide the indicator
`type` - value from `ActivityIndicatorView.IndicatorType` enum
You may alter it with standard SwiftUI means like this:
```swift
ActivityIndicatorView(isVisible: $showLoadingIndicator, type: .default)
.frame(width: 50.0, height: 50.0)
.foregroundColor(.red)
```
Or specify another indicator type:
```swift
ActivityIndicatorView(isVisible: $showLoadingIndicator, type: .growingArc(.red, lineWidth: 4))
.frame(width: 50.0, height: 50.0)
```
### Indicator types
Each indicator type has a number of parameters that have reasonable defaults. You can change them as you see fit, but it is advised to not set them too high or too low.
`default` - iOS UIActivityIndicator style
```swift
.default(count: 8)
```
`arcs`
```swift
.arcs(count: 3, lineWidth: 2)
```
`rotatingDots`
```swift
.rotatingDots(count: 5)
```
`flickeringDots`
```swift
.flickeringDots(count: 8)
```
`scalingDots`
```swift
.scalingDots(count: 3, inset: 2)
```
`opacityDots`
```swift
.opacityDots(count: 3, inset: 4)
```
`equalizer`
```swift
.equalizer(count: 5)
```
`growingArc` - add custom color for growing Arc, the default value is `Color.black`
```swift
.growingArc(.red, lineWidth: 4))
```
`growingCircle` no parameters
`gradient` - circle with angular gradient border stroke, pass colors ilke this:
```swift
.gradient([.white, .red], lineWidth: 4)
```
## Examples
To try out the ActivityIndicatorView examples:
- Clone the repo `git clone git@github.com:exyte/ActivityIndicatorView.git`
- Open terminal and run `cd /Example`
- Run `pod install` to install all dependencies
- Run `xed .` to open project in the Xcode
- Try it!
## Installation
### CocoaPods
```ruby
pod 'ActivityIndicatorView'
```
### Carthage
```ogdl
github "Exyte/ActivityIndicatorView"
```
### Swift Package Manager
```swift
dependencies: [
.package(url: "https://github.com/exyte/ActivityIndicatorView.git", from: "0.0.1")
]
```
### Manually
Drop [ActivityIndicatorView.swift](https://github.com/exyte/ActivityIndicatorView/blob/master/Source/ActivityIndicatorView.swift) into your project.
## Requirements
* iOS 13+ / watchOS 13+ / tvOS 13+ / macOS 10.15+
* Xcode 11+