Skip to content

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

License

Notifications You must be signed in to change notification settings

gokulnair2001/Capo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

75 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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