Skip to content

Commit edada21

Browse files
committed
Merge branch 'master' of github.com:mapierce/Loadable
2 parents efaa109 + e66a768 commit edada21

File tree

1 file changed

+56
-15
lines changed

1 file changed

+56
-15
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 56 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,70 @@
1-
# Progressable
1+
![logo](https://i.imgur.com/TFLnbfK.png)
22

3-
[![CI Status](https://img.shields.io/travis/Matthew Pierce/Progressable.svg?style=flat)](https://travis-ci.org/Matthew Pierce/Progressable)
4-
[![Version](https://img.shields.io/cocoapods/v/Progressable.svg?style=flat)](https://cocoapods.org/pods/Progressable)
5-
[![License](https://img.shields.io/cocoapods/l/Progressable.svg?style=flat)](https://cocoapods.org/pods/Progressable)
6-
[![Platform](https://img.shields.io/cocoapods/p/Progressable.svg?style=flat)](https://cocoapods.org/pods/Progressable)
3+
[![Build Status](https://app.bitrise.io/app/e89c0d6172145d37/status.svg?token=hwyljiO1CFXgPTTp5f-y7A&branch=master)](https://app.bitrise.io/app/e89c0d6172145d37)
4+
[![Version](https://img.shields.io/cocoapods/v/Loadable.svg?style=flat)](https://cocoapods.org/pods/Loadable)
5+
[![License](https://img.shields.io/cocoapods/l/Loadable.svg?style=flat)](https://cocoapods.org/pods/Loadable)
6+
[![Platform](https://img.shields.io/cocoapods/p/Loadable.svg?style=flat)](https://cocoapods.org/pods/Loadable)
77

8-
## Example
8+
## πŸ€” About
99

10-
To run the example project, clone the repo, and run `pod install` from the Example directory first.
10+
Loadable allows you to attach `Progress` to any `UIView` or subclass and then use the `UIView` to display progress. You can animate the progress, set the progress colour and show or hide the percentage progress in the bottom corner of your view. Please see below for demos of Loadable working on a `UIView` and a `UISegmentControl`.
11+
12+
<p align="center">
13+
<img src="https://i.imgur.com/g73LOXs.gif">
14+
<img src="https://i.imgur.com/g2nBipd.gif">
15+
</p>
1116

12-
## Requirements
17+
## πŸ”› Demo
1318

14-
## Installation
19+
To run the example project, clone the repo, and run `pod install` from the Example directory first.
1520

16-
Progressable is available through [CocoaPods](https://cocoapods.org). To install
21+
## πŸ“² Installation
22+
23+
Loadable is available through [CocoaPods](https://cocoapods.org). To install
1724
it, simply add the following line to your Podfile:
1825

1926
```ruby
20-
pod 'Progressable'
27+
pod 'Loadable'
2128
```
2229

23-
## Author
30+
and run `pod install`
31+
32+
## βœ… Requirements
33+
- Swift 5.0
34+
- iOS 11.0
35+
36+
## πŸ‘©β€πŸ’» How to use
37+
38+
Loadable can be used on any `UIView` or subclass. As it is built as an extension of `UIView`, the only thing you need to do to use it is import it at the top of your file. After that you can configure the view you want to use as a loading view with a few different options as follows:
39+
40+
```swift
41+
let viewToShowLoading: UIView = UIView()
42+
let progress = Progress(totalUnitCount: 100)
43+
44+
viewToShowLoading.monitoredProgress = progress
45+
46+
// everything from here on is optional configuration. The lines above will setup everything
47+
48+
viewToShowLoading.animateProgrss = true
49+
viewToShowLoading.progressColor = .blue
50+
viewToShowLoading.showPercentage = true
51+
viewToShowLoading.progressPercentageFontSize = 12.0
52+
viewToShowLoading.progressPercentageFontColor = .red
53+
viewToShowLoading.clearOnComplete = false
54+
```
55+
56+
As you can see from the comment in the above snippet, all that is necessary to make the `UIView` become a Loadable one is attaching some `Progress` to the new `monitoredProgress` property. After that you can configure the Loadable view any way you like.
57+
58+
## πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Contributing
59+
60+
If you run into any problems, please submit an issue. Pull requests are also welcome! By contributing to Loadable you agree that your contributions will be licensed under its MIT license.
61+
62+
If you use Loadable in your app I'd love to hear from you on [Twitter](https://twitter.com/PierceMatthew)!
63+
64+
## πŸ™‹β€β™‚οΈ Author
2465

25-
Matthew Pierce, [email protected]
66+
WaveTab was created by Matthew Pierce ([@PierceMatthew](https://twitter.com/PierceMatthew))
2667

27-
## License
68+
## πŸ”– License
2869

29-
Progressable is available under the MIT license. See the LICENSE file for more info.
70+
Loadable is available under the MIT license. See the LICENSE file for more info.

0 commit comments

Comments
Β (0)