|
1 |
| -# ASMultiColorCircularLoader |
| 1 | +# ASMultiColorCircularLoader |
| 2 | +This is a simple multicolor circular progress loader. |
| 3 | + |
| 4 | +## Requirements |
| 5 | +Xcode 11 and Swift 4+ |
| 6 | + |
| 7 | +## Installation |
| 8 | +ASMultiColorCircularLoader is available through [CocoaPods](https://cocoapods.org). To install |
| 9 | +it, simply add the following line to your Podfile: |
| 10 | + |
| 11 | +```ruby |
| 12 | +pod 'ASMultiColorCircularLoader' |
| 13 | +``` |
| 14 | + |
| 15 | + |
| 16 | +A simple and easy to use multicolor circular loader view which allows all the necessary customizations. |
| 17 | + |
| 18 | +## Usage |
| 19 | +Drag a view onto the storyboard and set it class to ASMultiColorCircularLoader.You can customize the appearance of the loader as shown below. |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | +```swift |
| 24 | +let circularSpinner = CGRect(x: 0, y: 0, width: 150, height: 150) |
| 25 | +circularSpinner.lineWidth = 5.0 |
| 26 | +circularSpinner.rotationAnimationDuration = 2.0 |
| 27 | +circularSpinner.lineDrawWithdrawValue = 0.95 |
| 28 | +circularSpinner.delayBetweenDrawAndWithdrawAnimation = 0 |
| 29 | +circularSpinner.colors = [.red] |
| 30 | +circularSpinner.drawDurations = [0.5] |
| 31 | +circularSpinner.drawDelays = [0.0] |
| 32 | +circularSpinner.withdrawDurations = [0.5] |
| 33 | +circularSpinner.withdrawDelays = [0.0] |
| 34 | + |
| 35 | +circularSpinner.startAnimation() |
| 36 | +``` |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +```swift |
| 41 | +let circularSpinner = CGRect(x: 0, y: 0, width: 150, height: 150) |
| 42 | +circularSpinner.lineWidth = 5.0 |
| 43 | +circularSpinner.rotationAnimationDuration = 2.0 |
| 44 | +circularSpinner.lineDrawWithdrawValue = 0.95 |
| 45 | +circularSpinner.delayBetweenDrawAndWithdrawAnimation = 0 |
| 46 | +circularSpinner.colors = [.red, .green] |
| 47 | +circularSpinner.drawDurations = [0.5, 0.5] |
| 48 | +circularSpinner.drawDelays = [0.0, 0.3] |
| 49 | +circularSpinner.withdrawDurations = [0.5, 0.5] |
| 50 | +circularSpinner.withdrawDelays = [0.3, 0.0] |
| 51 | + |
| 52 | +circularSpinner.startAnimation() |
| 53 | +``` |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | +```swift |
| 58 | +let circularSpinner = CGRect(x: 0, y: 0, width: 150, height: 150) |
| 59 | +circularSpinner.lineWidth = 5.0 |
| 60 | +circularSpinner.rotationAnimationDuration = 10.0 |
| 61 | +circularSpinner.lineDrawWithdrawValue = 0.98 |
| 62 | +circularSpinner.delayBetweenDrawAndWithdrawAnimation = 0 |
| 63 | +circularSpinner.colors = [UIColor(rOS: 0.965, g: 0.659, b: 0.788), UIColor(rOS: 0.212, g: 0.675, b: 0.878), UIColor(rOS: 0.043, g: 0.714, b: 0.702)] |
| 64 | +circularSpinner.drawDurations = [1.0, 0.6, 0.4] |
| 65 | +circularSpinner.drawDelays = [0.0, 0.5, 0.8] |
| 66 | +circularSpinner.withdrawDurations = [0.8, 0.6, 0.4] |
| 67 | +circularSpinner.withdrawDelays = [0.3, 0.1, 0.0] |
| 68 | + |
| 69 | +circularSpinner.startAnimation() |
| 70 | +``` |
| 71 | + |
| 72 | +## Author |
| 73 | +arijits95, arijits95@gmail.com |
| 74 | + |
| 75 | +## License |
| 76 | +ASMultiColorCircularLoader is available under the MIT license. See the LICENSE file for more info. |
0 commit comments