Giter VIP home page Giter VIP logo

swiftloader's Introduction

SwiftLoader

SwiftLoader is a simple and beautiful activity indicator written in Swift.

###Example

Usage

In case you installed SwiftLoader via CocoaPods you need to import it (add this somewhere at the top of your source code file):

import SwiftLoader

Show SwiftLoader without text:

  SwiftLoader.show(animated: true)

Show SwiftLoader with text:

  SwiftLoader.show(title: "Loading...", animated: true)

Hide SwiftLoader:

  SwiftLoader.hide()

Configuration

SwiftLoader has simple configuration system.

You need to create SwiftLoader.Config object, set params:

  var config : SwiftLoader.Config = SwiftLoader.Config()
  config.size = 150
  config.spinnerColor = .redColor()
  config.foregroundColor = .blackColor()
  config.foregroundAlpha = 0.5

and set new config for SwiftLoader:

  SwiftLoader.setConfig(config)

Current available params:

  • size - Size of loader
  • spinnerColor - Color of spinner view
  • spinnerLineWidth - Line width of spinner view layer
  • titleTextColor - Color of title text
  • titleTextFont - Font of title text
  • backgroundColor - Background color for loader
  • foregroundColor - Foreground color for loader
  • cornerRadius - Radius of corners of loader
  • foregroundAlpha - Alpha property for foreground

Install

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

pod install 'SwiftLoader'

NB: Currently Swift CocoaPods work only with 0.36 pre-release version. If you want to learn how to install a Swift cocoapod read more here: http://blog.cocoapods.org/Pod-Authors-Guide-to-CocoaPods-Frameworks/

In case you don’t want to use CocoaPods - just copy the file SwiftLoader/SwiftLoader.swift to your Xcode project.

Maintainers

License

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

swiftloader's People

Contributors

jonpacker avatar josete89 avatar leoru avatar maykonmeier avatar mikekavouras avatar philipperiegert avatar readmecritic avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.