https://github.com/Ekhoo/Loader
Amazing animated switch activity indicator written in swift
https://github.com/Ekhoo/Loader
Last synced: 4 months ago
JSON representation
Amazing animated switch activity indicator written in swift
- Host: GitHub
- URL: https://github.com/Ekhoo/Loader
- Owner: Ekhoo
- License: mit
- Created: 2015-12-06T16:41:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-21T17:11:01.000Z (over 7 years ago)
- Last Synced: 2024-09-15T22:02:10.478Z (7 months ago)
- Language: Swift
- Homepage:
- Size: 408 KB
- Stars: 104
- Watchers: 4
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - Loader - Amazing animated switch activity indicator written in swift. (UI / Activity Indicator)
- awesome-ios-star - Loader - Amazing animated switch activity indicator written in swift. (UI / Activity Indicator)
README

[](http://cocoapods.org/pods/SwitchLoader)
[](http://cocoapods.org/pods/SwitchLoader)
[](http://cocoapods.org/pods/SwitchLoader)

[](https://github.com/Carthage/Carthage)
Simple and light weight animated switch activity indicator.
# Demo

# Installation
## CocoaPods
Loader is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "SwitchLoader", '~> 0.0.1'
```## Carthage
[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with [Homebrew](http://brew.sh/) using the following command:
```bash
$ brew update
$ brew install carthage
```To integrate Loader into your Xcode project using Carthage, specify it in your `Cartfile`:
```ogdl
github "Ekhoo/Loader" ~> 0.0.1
```Run `carthage update` to build the framework and drag the built `Loader.framework` into your Xcode project.
# Usage
```swift
func myFunc() {
let loader: Loader = Loader(frame: CGRectMake(0.0, 0.0, 80.0, 40.0))
self.view.addSubView(loader)
loader.startAnimating()
}
```## Interface
```swift
public func startAnimating() // Animate the switch activity indicator
public func stoptAnimating() // Stop Animating the switch activity indicatorpublic var loaderColor: UIColor // The background color
public var switchColor: UIColor // The animated switch color
```# Author
Lucas Ortis:
- [email protected]
- [@LucasEkhoo](https://twitter.com/LucasEkhoo)
- [Linkedin](https://fr.linkedin.com/in/lucasortis)# License
Inspired from this [Dribbble](https://dribbble.com/shots/2389529-Like-a-preloader) project.
Loader is available under the MIT license. See the LICENSE file for more info.