Giter VIP home page Giter VIP logo

emspinnerbutton's Introduction

Icon

Language license CocoaPods GitHub stars

EMSpinnerButton is an elegant button with a spinner animation and is fully customizable.
Inspired by the Starbucks app

Icon

Table of Contents

Features

  • Title
  • Gradient Background (Optional)
  • Various animations
  • Fully Customizable
  • CocoaPods

Requirements

  • iOS 9.0+
  • Xcode 9+

Installation

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate EMSpinnerButton into your Xcode project using CocoaPods, specify it in your Podfile:

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

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

Then, run the following command:

$ pod install

Usage

In the storyboard add a UIButton and change its class to EMSpinnerButton

Animations

Collapse

// Collapse animation
button.animate(animation: .collapse)

Expand

// Expand animation
button.animate(animation: .expand)

Shake

// Shake animation
button.animate(animation: .shake)

Customization

Button Title

button.title = "LOGIN"
// Default title = nil

Corner Radius

button.cornerRadius = button.frame.height/2
// Default corner radius = 0

Title Color

button.titleColor = UIColor.red
// Default color = UIColor.white

Background Color

button.backgroundColor = UIColor.white
// Default color = UIColor(red: 49/255, green: 177/255, blue: 229/255, alpha: 1.0)

Background Gradient Color

button.gradientColor = UIColor.white
// Default colors = nil

Spinner Color

button.spinnerColor = UIColor.lightGray.cgColor
// Default color = UIColor.white.cgColor

License


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

emspinnerbutton's People

Contributors

egmoll7 avatar

Watchers

James Cloos 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.