An open API service indexing awesome lists of open source software.

https://github.com/gokulnair2001/capo

A custom Framework used to add animations and effect to UIButtons.
https://github.com/gokulnair2001/capo

animation animations capo convenient custom-library flash gradient-background pulse swift5 uibutton uikit xcode

Last synced: 3 months ago
JSON representation

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

Awesome Lists containing this project

README

          

Screenshot 2020-12-27 at 2 22 23 PM

# Capo

[![Versions](https://img.shields.io/cocoapods/v/Capo.svg?style=flat)](https://cocoapods.org/pods/Capo)
![commits](https://img.shields.io/github/commits-since/CapoFrame/Capo/1.2.3/master)
![contributor](https://img.shields.io/github/contributors/CapoFrame/Capo)
![Badge](https://img.shields.io/badge/License-MIT-yellow)
![Badge](https://img.shields.io/badge/Xcode-12.0-green)
![badge](https://img.shields.io/badge/Swift-5.1-red)
![Badge](https://img.shields.io/badge/RepoSize-6kb-brown)
[![Platform](https://img.shields.io/cocoapods/p/Capo.svg?style=flat)](https://cocoapods.org/pods/Capo)

## 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](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'Capo'
```
# How To Use 📁 ?

### Apply CornerRadius, BorderWidth and BorderColor

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

### Apply Gradient Background

```swift
CapoTuner.applyGradient(button:UIButton, color1: UIColor, color2: UIColor, cornerRadius: CGFloat)
```
### Apply Shadow Effect

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

### Apply Pulse Animation

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

### Apply Flash Aimation

```swift
CapoTuner.flash(button: UIButton, duration: CFTimeInterval, from: CFTimeInterval, to: CFTimeInterval, autoReverse: Bool = false, repeatCount: Float = 0)
```
### Apply PopColor Animation

```swift
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](https://github.com/gokulnair2001/Capo/blob/master/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](https://www.linkedin.com/in/gokul-r-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](https://www.linkedin.com/in/gokul-r-nair/)🥰

OR

**Drop a star ⭐ if you find this project interesting!**


Made with ❤️ in 🇮🇳 By Gokul Nair