Create animation, round corner of view and much more easily for your iOS app
As an iOS Developer, we have spend a lot of line by code just for create round corner or animation for view/button. It’s waste our time and line of code just for doing that. Now with AfriwanLib library, we can create animation, round corner of view or button and much more easily for your iOS app.

How to use
First step, add AfriwanLib on your Podfile:

Open your Terminal and run Pod Install. Don’t forget to import AfriwanLib in your Class:

Now you can create round corner of your view or button easily with only single line of code:
roundCorner(view: button_blue, cornerRadius: 15)
Or create custom round corner only with adding parameter you needed:
// Custom round corner with full parameter roundCorner(view: view_green, cornerRadius: 30, shadowOpacity: 0.4, shadowRadius: 2.5, shadowOffset: CGSize.init(width: 1, height: 1), masksToBounds: false) // Custom round corner with some parameter, for this example I create circle view. roundCorner(view: view_orange, cornerRadius: view_orange.frame.height/2, shadowOpacity: 0.35, shadowRadius: 3.2)
Create animation for UIView, UIButton, UITextField, etc as simple as this:
pulsate(view: yourVieworButton)
Or create custom animation only with adding parameter you needed:
// Custom animation with some parameter shake(view: view_green, duration: 0.2, autoreverses: true, repeatCount: 3) // Custom animation with full parameter flash(view: view_orange, duration: 0.5, autoreverses: true, repeatCount: 5, fromValue: 1, toValue: 0.2, timingFunction: CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut))
Project example include in this Library, you can clone or download from my Github repository. Happy Coding!!
Posted on: July 2, 2019, by : Afriwan Ahda