Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ppth0608/bpcircleactivityindicator
A lightweight and awesome loading Activity Indicator for your iOS app.
https://github.com/ppth0608/bpcircleactivityindicator
activityindicator animation cocoapods interval ios loading-spinner loadingview storyboard storyboard-setup swift swift3 ui
Last synced: about 1 month ago
JSON representation
A lightweight and awesome loading Activity Indicator for your iOS app.
- Host: GitHub
- URL: https://github.com/ppth0608/bpcircleactivityindicator
- Owner: ppth0608
- License: mit
- Created: 2017-04-16T04:42:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-04-24T15:02:22.000Z (over 7 years ago)
- Last Synced: 2024-10-12T14:23:10.686Z (about 1 month ago)
- Topics: activityindicator, animation, cocoapods, interval, ios, loading-spinner, loadingview, storyboard, storyboard-setup, swift, swift3, ui
- Language: Swift
- Size: 26.4 KB
- Stars: 46
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BPCircleActivityIndicator
**BPCircleActivityIndicator** is a clean and easy-to-use Activity Indicator meant to display the progress of an ongoing task on iOS.
## Demo (no_interval, interval)
## Requirements
- Deployment Target - `iOS 8.0`
- Swift Version - `Swift 3.1`## Installation
### CocoaPods
BPCircleActivityIndicator is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "BPCircleActivityIndicator"
```### Carthage
simply add the following line to your Cartfile:``` ruby
github "ppth0608/BPCircleActivityIndicator"
```### Manual
Copy the folder `Source/` to your project## Usage
Using BPCircleActivityIndicator isn't difficult at all. There are two actual ways of implementing it in your project:
- Storyboard setup
- Manual setup### Storyboard Setup
First, you're about to add 1 UIViews to your Storyboard and setup custom classes (You can set custom classes in **Identity Inspector**) as it shown in the picture below(When you set custom class **BPCircleActivityIndicator**, you can see how view looks like cuz **@IBDesignable**)
and, add Outlet in to your code
```Swift
@IBOutlet weak var circleIndicator: BPCircleActivityIndicator!
```### Menual setup
if for some reason you'd like to setup **BPCircleActivityIndicator** manually you have to do the following step
```Swift
var circleIndicator: BPCircleActivityIndicator!
override func viewDidLoad() {
super.viewDidLoad()
circleIndicator = BPCircleActivityIndicator(frame: CGRect(x: 0, y: 0, width: 30, height: 30))
view.addSubview(circleIndicator)
}
```### Animate & Stop
You can easily animate and stop animation
```Swift
@IBAction func startButtonTapped(sender: UIButton) {
circleIndicator.animate()
}
@IBAction func stopButtonTapped(sender: UIButton) {
circleIndicator.stop()
}
```### Customize
if you want to setup rotate speed or interval, you can call methods as it shown in the code below (Custom color is not suppoerted yet)
```Swift
@IBAction func startButtonTapped(sender: UIButton) {
circleIndicator
.rotateSpeed(0.6)
.interval(0.3)
.animate()
}
```Default setting is shown in below
- Rotate Speed : 0.6
- Interval : 0.3## TODO
- [ ] Custom Color Support## Author
Ben.Park, [email protected]
## Designed By
Suna.Shin, [email protected]
## Contribute
always welcome :)
please, pull request for **BPCircleActivityIndicator**## License
BPCircleActivityIndicator is available under the MIT license. See the LICENSE file for more info.