Latest 0.1.0
Homepage https://github.com/EngrAhsanAli/AALoaders
License MIT
Platforms ios 8.0
Authors

Table of Contents

Swift 3.0 Carthage compatible CocoaPods License MIT Build Status
License MIT [CocoaPods]()

Description

AALoaders is a lightweight, easy-to-use and powerful progress view loaders framework, written in Swift. It uses simple native elements for progress loading with customisations and allow to use without creating instance.

Demonstration

It includes four type of loading views as follows:

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

Requirements

  • iOS 8.0+
  • Xcode 8.0+
  • Swift 3+

Installation

AALoaders can be installed using CocoaPods, Carthage, or manually.

CocoaPods

AALoaders is available through CocoaPods. To install CocoaPods, run:

$ gem install cocoapods

Then create a Podfile with the following contents:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

target '<Your Target Name>' do
pod 'AALoaders'
end

Finally, run the following command to install it:

$ pod install

Carthage

To install Carthage, run (using Homebrew):

$ brew update
$ brew install carthage

Then add the following line to your Cartfile:

github "EngrAhsanAli/AALoaders" 

Then import the library in all files where you use it:

import AALoaders

Manual Installation

If you prefer not to use either of the above mentioned dependency managers, you can integrate AALoaders into your project manually by adding the files contained in the Classes folder to your project.

Getting Started


AANavigationLoader

AANavigationLoader is basically UIProgressView bar loading in UINavigationController with options for customization.

AANavigationOptions can be configured using following types:

AANavigationOptions Types Description
maxProgress Float Max progress value allowed for animation
barHeight CGFloat UIProgressView bar height (1.0 to 5.0)
barProgressColor UIColor UIProgressView bar progress color
barBackgroundColor UIColor UIProgressView bar tracking color
progressStep Float Progress animation step (0.05 to 0.0025)

Usage:

let options = AANavigationOptions()
// Configure options
//
//
//

// Show loader with options
self.navigationController?.aa_showLoader(options)
// Show loader without options
self.navigationController?.aa_showLoader()
// Cancel loader
self.navigationController?.aa_hideLoader(true)
// Complete loader
self.navigationController?.aa_hideLoader(false)

AAButtonLoader

AAButtonLoader is basically UIActivityIndicatorView loading in UIButton with options for customization.

AAButtonOptions can be configured using following types:

AAButtonOptions Types Description
color UIColor? Activity indicator color
position LoaderPosition? Activity indicator position in UIButton

LoaderPosition has following types:

  • left
  • right
  • before
  • after
  • middle

Usage:

let options = AAButtonOptions()
// Configure options
//
//
//

// Toggle loader with options
self.button.aa_toggleLoader(options)
// Toggle loader without options
self.button.aa_toggleLoader()

AAImageLoader

AAImageLoader is basically UIActivityIndicatorView loading with downloading from given HTTP URL in UIImageView with options for customization.

AAImageOptions can be configured using following types:

AAImageOptions Types Description
color UIColor Activity indicator color

Usage:

let options = AAImageOptions()
// Configure options
//
//
//

// Set image with options
self.imageView.aa_setImage(string: <URL_HERE>, withOptions: options)
// Set image without options
self.imageView.aa_setImage(string: <URL_HERE>)

AADialogLoader

AADialogLoader is basically UIActivityIndicatorView loading with title and message in UIAlertController and options for customization.

AADialogOptions can be configured using following types:

AADialogOptions Types Description
title String? Title string
message String? Message string
titleAttributes Dictionary<String, Any>? Title attributes
messageAttributes Dictionary<String, Any>? Message attributes
loaderColor UIColor? Activity indicator color
cancelColor UIColor? Cancel button color
cornerRadius CGFloat? Corner radius
borderWidth CGFloat? Border width
borderColor UIColor? Border color
shadowColor UIColor? Shadow color
blurEffect UIBlurEffectStyle? UIBlurEffectStyle style
backgroundColor UIColor? Background color

Usage:

let options = AADialogOptions()
// Configure options
//
//
//

// Show dialog with options
self.aa_showLoader(deadline: dismissTime, options: options, withCancel: "Cancel")
// Show dialog without options
self.aa_showLoader(deadline: dismissTime)
// Show dialog without deadline
self.aa_showLoader()

Contributions & License

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

Pull requests are welcome! The best contributions will consist of substitutions or configurations for classes/methods known to block the main thread during a typical app lifecycle.

I would love to know if you are using AALoaders in your app, send an email to Engr. Ahsan Ali

Latest podspec

{
    "name": "AALoaders",
    "version": "0.1.0",
    "summary": "AALoaders is a lightweight, easy-to-use and powerful progress view loaders framework written in Swift.",
    "description": "AALoaders is a lightweight, easy-to-use and powerful progress view loaders framework, written in Swift. It uses simple native elements for progress loading with customisations and allow to use without creating instance.",
    "homepage": "https://github.com/EngrAhsanAli/AALoaders",
    "screenshots": "https://raw.githubusercontent.com/EngrAhsanAli/AALoaders/master/Screenshots/Home.png",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Engr. Ahsan Ali": "[email protected]"
    },
    "source": {
        "git": "https://github.com/EngrAhsanAli/AALoaders.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "AALoaders/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This