GithubHelp home page GithubHelp logo

gokulnair2001 / capo Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 0.0 223 KB

A custom Framework used to add animations and effect to UIButtons.

Home Page: https://capoframe.github.io/Capo/

License: MIT License

Ruby 17.14% Swift 82.86%
custom-library uibutton animation gradient-background swift5 capo xcode animations pulse convenient

capo's Introduction

Screenshot 2020-12-27 at 2 22 23 PM

Capo

Versions commits contributor Badge Badge badge Badge Platform

About ๐Ÿ“’

So Capo is a custom Framework used to apply various animations and effect to a button. Capo reduces your 10-12 lines of code to 1 line making it more convenient to read and execute. Capo comes with various animations like pulse, flash and effects like applying gradient background and etc. So capo doesn't require any additional dependency's ,its a small and optimized library to make your work more convenient, easy, optimised and easy to understand too.

Idea โค๏ธ

So while coding I found whenever it was about applying animations and effects we were supposed to write same lines of code multiple time, this made my coding frequency slow and even making the code appearance bad. So I thought to make a library which would make my work easy eventually making others work too. This was the idea behind developing Capo.

Example

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

Requirements

Device running on iOS/iPadOS 12.0+ versions ๐Ÿ“ฑ.

Installation

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

pod 'Capo'

How To Use ๐Ÿ“ ?

Apply CornerRadius, BorderWidth and BorderColor

CapoTuner.tune(button: UIButton ,cornerRadius: CGFloat, borderWidth: CGFloat, borderColor: UIColor )

Apply Gradient Background

CapoTuner.applyGradient(button:UIButton, color1: UIColor, color2: UIColor, cornerRadius: CGFloat) 

Apply Shadow Effect

CapoTuner.applyShadow(button: UIButton, color: UIColor, width: Double, height: Double, Radius: CGFloat, opacity: Float)

Apply Pulse Animation

CapoTuner.pulsate(button: UIButton, duration: CFTimeInterval, from: CFTimeInterval, to: CFTimeInterval, autoReverse: Bool = false, repeatCount: Float = 0,velocity: CGFloat, damping: CGFloat)

Apply Flash Aimation

CapoTuner.flash(button: UIButton, duration: CFTimeInterval, from: CFTimeInterval, to: CFTimeInterval, autoReverse: Bool = false, repeatCount: Float = 0)

Apply PopColor Animation

CapoTuner.popColors(button: UIButton,fromColor: UIColor, toColor: UIColor, cornerRadius:CGFloat = 0,duration: CFTimeInterval, autoReverse: Bool = false, repeatCount: Float = 0)

Snapshots ๐ŸŒ‰

Effect 1 Effect 2 Effect 3
Screenshot 2020-12-27 at 2 22 23 PM Screenshot 2020-12-27 at 2 27 41 PM Screenshot 2020-12-27 at 2 27 41 PM
Effect 4 Effect 5 Effect 6
Screenshot 2020-12-27 at 2 22 23 PM Screenshot 2020-12-27 at 2 27 41 PM Screenshot 2020-12-27 at 2 27 41 PM
  • Sample animations given above are made with arbitrary values, you can change it according to your need ๐ŸŽ›.
  • Above given animations are applied on UIButtons!.

License

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

How to Contribute โœ๏ธ

  • Install the pod - Steps mentioned above
  • If you face issues in any step open a new issue.
  • To fix issues: Fork this repository, make your changes and make a Pull Request.

Note ๐Ÿ”ด

  • By default the "autoreverse" function for animations are kept false.

Updates โš ๏ธ

Right now capo comes with limited features, it will be updated with future releases, So stay tuned to know more about Capo.

Project Admin ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป

Gokul Nair

Like the Project ?

If you like using any of my projects or like what I'm doing, please consider backing me with appreciating my work: Message me๐Ÿฅฐ

OR

Drop a star โญ if you find this project interesting!

Made with โค๏ธ in ๐Ÿ‡ฎ๐Ÿ‡ณ By Gokul Nair

capo's People

Contributors

gokulnair2001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.