You can use Material Design (Google Material Design)) “ink ripple” interaction effect written in iOS swift.
Reffered from MaterialKit. and minimum implement(MKButton, MKCollectionView)
Please feel free to make pull requests.
- Ripple effect with box size
- Ripple animation
- Highly customizable(mask, duration, scaleRatio, etc..)
- 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
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"
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.
Add the RippleEffect directory to your project.
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
- Xcode 10.0 or greater
- iOS 10.0 or greater
Yuichi Matsuoka, anything12new14@gmail.com
RippleEffect is available under the MIT license. See the LICENSE file for more info.