Latest 1.0.0
Homepage https://github.com/anas10/AASquaresLoading
License MIT
Platforms ios 8.0, requires ARC
Authors

Simple loading animation using squares

Screenshot

Example

let loadingSquare = AASquaresLoading(target: self.view, size: 40)
// Customize background
loadingSquare.backgroundColor = UIColor.blackColor().colorWithAlphaComponent(0.4)
// Customize color
loadingSquare.color = UIColor.whiteColor()
// Start loading
loadingSquare.start()
....
// Stop loading
loadingSquare.stop()

More examples in the demo project.

Installation

CocoaPods

  1. Add to your podfile : pod 'AASquaresLoading'
  2. In your terminal : pod install

Manual

  1. Add AASquaresLoading.swift to your project
  2. That’s all you can use it!

Usage

Basic

  1. As a UIView method

    self.view.squareLoading.start(0.0)
    ...
    self.view.squareLoading.stop(0.0)
  2. As a standalone class

    let loadingSquare = AASquaresLoading(target: self.view, size: 40)
    loadingSquare.start()
    ....
    loadingSquare.stop()
  3. As a custom class interface builder by setting AASquareLoading as a custom class for a UIView

Customization

Change background color
self.view.squareLoading.backgroundColor = UIColor.redColor()
Change squares color
self.view.squareLoading.color = UIColor.whiteColor()
Change the square size
self.view.squareLoading.setSquareSize(120)

License

The MIT License (MIT)

Copyright (c) 2015 Anas AIT-ALI

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Latest podspec

{
    "name": "AASquaresLoading",
    "version": "1.0.0",
    "summary": "Simple loading animation using squares",
    "homepage": "https://github.com/anas10/AASquaresLoading",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Anas AIT ALI": "[email protected]"
    },
    "social_media_url": "http://twitter.com/anasaitali",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/anas10/AASquaresLoading.git",
        "tag": "1.0.0"
    },
    "source_files": "Source/AASquaresLoading.swift",
    "requires_arc": true
}

Pin It on Pinterest

Share This