Skip to content
Make any UIView or subclass a UIProgressView
Swift Ruby
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example
Loadable
.gitignore
.travis.yml
LICENSE
Loadable.podspec
README.md
_Pods.xcodeproj

README.md

logo

Build Status Version License Platform

🤔 About

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.

🔛 Demo

To run the example project, clone the repo, and run pod install from the Example directory first.

📲 Installation

Loadable is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'Loadable'

and run pod install

Requirements

  • Swift 5.0
  • iOS 11.0

👩‍💻 How to use

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:

let viewToShowLoading: UIView = UIView()
let progress = Progress(totalUnitCount: 100)

viewToShowLoading.monitoredProgress = progress 

// everything from here on is optional configuration. The lines above will setup everything

viewToShowLoading.animateProgrss = true
viewToShowLoading.progressColor = .blue
viewToShowLoading.showPercentage = true
viewToShowLoading.progressPercentageFontSize = 12.0
viewToShowLoading.progressPercentageFontColor = .red
viewToShowLoading.clearOnComplete = false

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.

👨‍👩‍👧‍👦 Contributing

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.

If you use Loadable in your app I'd love to hear from you on Twitter!

🙋‍♂️ Author

WaveTab was created by Matthew Pierce (@PierceMatthew)

🔖 License

Loadable is available under the MIT license. See the LICENSE file for more info.

You can’t perform that action at this time.