RippleEffect
You can use Material Design (Google Material Design)) “ink ripple” interaction effect written in iOS swift.
Please feel free to make pull requests.
Features
- Ripple effect with box size
- Ripple animation
- Highly customizable
- By supporting @IBInspectable, the class properties can be exposed in the Interface Builder, and you can edit these properties in realtime
- MKButton
- MKCollectionViewCell
- Support Swift4.2
Installation
CocoaPods
RippleEffect is available through CocoaPods. If you have cocoapods 1.5.3 or greater, you can install it, simply add the following line to your Podfile: pod "RippleEffect"
Carthage
If you’re using Carthage, simply add
RippleEffect to your Cartfile
:
github "manchan/RippleEffect"
Make sure to add RippleEffect.framework
to "Linked Frameworks and Libraries" and "copy-frameworks" Build Phases.
Manually
Add the RippleEffect directory to your project.
Usage In Swift
To run the example project, clone the repo, and run pod install
from the Example directory first.
If you install from pod, you have to write import RippleEffect
.
If you want to apply ripple effect for UIButton
let button = MKButton(frame: CGRect(x: 10, y: 10, width: 100, height: 35))
button.maskEnabled = true
button.rippleLayerColor = .orange
Requirements
- Xcode 10.0 or greater
- iOS 10.0 or greater
Author
Yuichi Matsuoka, [email protected]
License
RippleEffect is available under the MIT license. See the LICENSE file for more info.