Giter Site home page Giter Site logo

squishbutton's Introduction

CocoaPods CocoaPods Carthage License Platform Twitter: @BalestraPatrick

Inspired by the new Clips app record button, SquishButton is a UIButton subclass that implements the same design and behavior.

Usage

Use it as every other UIButton object and customize it to suit your needs. These are the public properties that SquishButton adds:

/// The number of pixels to scale the inner rectangle.
open var scaling = CGFloat(10)

/// The duration of the animation when the button is in the highlighted state.
open var animationDuration = 0.15

/// The color of the inner rectangle.
open var color = UIColor(red: 244.0/255.0, green: 51.0/255.0, blue: 50.0/255.0, alpha: 1.0)

/// The inset between the outer border and inner rectangle.
open var innerInset = CGFloat(5)

Requirements

iOS 8.3 and Swift 3.2.

If you are using Swift 4, please use the swift4 branch.

Installation

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

pod 'SquishButton'

You can also use Carthage if you prefer. Add this line to your Cartfile.

github "BalestraPatrick/SquishButton"

Author

I'm Patrick Balestra. Email: [email protected] Twitter: @BalestraPatrick.

License

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

squishbutton's People

Contributors

balestrapatrick avatar

Watchers

James Cloos avatar Saroj Raut 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.