Skip to content

With RLoad you can in a simple way add a loading indicator through a CocoaPod.

License

Notifications You must be signed in to change notification settings

rashwanlazkani/RLoad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RLoad

[CI Status](https://travis ci.org/rashwanlazkani/RLoad) Version License Platform

Example

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

Requirements

Installation

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

pod 'RLoad'

There are four methods you can use:

create(x: CGFloat, y: CGFloat, radius: CGFloat, begin: Bool)

Creates the indicator. Four parameters:

x: x-position of the indicator
y: y-position of the indicator
radis: radius of the indicator
begin: if you want to indicator to start
start()
Starts the indicator
stop()
Stops the indicator
remove()
Removes the indicator from your view

To quickly get started, simply just add the following:

let rload = RLoadIndicator()
rload.create(x: view.frame.midX - 50, y: view.frame.midY - 50, radius: 50, begin: true)
view.addSubview(rload)

Your´re able to change the colors by either:

Adding additional colors:
rload.colors.append(.gray)

Or adding a new list:
rload.colors = [.green, .gray, .magenta]

Author

rashwanlazkani, rashwan87@gmail.com

License

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