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.
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.
To run the example project, clone the repo, and run pod install
from the Example directory first.
Device running on iOS/iPadOS 12.0+ versions ๐ฑ.
Capo is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Capo'
CapoTuner.tune(button: UIButton ,cornerRadius: CGFloat, borderWidth: CGFloat, borderColor: UIColor )
CapoTuner.applyGradient(button:UIButton, color1: UIColor, color2: UIColor, cornerRadius: CGFloat)
CapoTuner.applyShadow(button: UIButton, color: UIColor, width: Double, height: Double, Radius: CGFloat, opacity: Float)
CapoTuner.pulsate(button: UIButton, duration: CFTimeInterval, from: CFTimeInterval, to: CFTimeInterval, autoReverse: Bool = false, repeatCount: Float = 0,velocity: CGFloat, damping: CGFloat)
CapoTuner.flash(button: UIButton, duration: CFTimeInterval, from: CFTimeInterval, to: CFTimeInterval, autoReverse: Bool = false, repeatCount: Float = 0)
CapoTuner.popColors(button: UIButton,fromColor: UIColor, toColor: UIColor, cornerRadius:CGFloat = 0,duration: CFTimeInterval, autoReverse: Bool = false, repeatCount: Float = 0)
Effect 1 | Effect 2 | Effect 3 |
---|---|---|
Effect 4 | Effect 5 | Effect 6 |
---|---|---|
- Sample animations given above are made with arbitrary values, you can change it according to your need ๐.
- Above given animations are applied on UIButtons!.
Capo is available under the MIT license. See the LICENSE for more info.
- 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.
- By default the "autoreverse" function for animations are kept false.
Right now capo comes with limited features, it will be updated with future releases, So stay tuned to know more about Capo.
Gokul Nair |
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