JWWaveView provides a convenient way to add water-waving effect to any of your UIView instance.
JWWaveView is made possible by using CAReplicatorLayer as its core. Comparing to using timer to update the wave path continuously to get the water-waving effect, it's more efficient.
Some comparisons and measurements carried out between timer-driven waving animation and CAReplicatorLayer-based animation are laid out in this blog post.
- iOS 8.0+
To run the example project, clone the repo, and run
pod install from the Example directory first.
Pause and unpause wave view:
Adding wave view to table view cells:
- multiple cycles of waves are supported
- pause and unpause wave animation
- start with user-specified wave phase shift
- two waves overlapping to provide depth
- convenient category should be added
Installation with CocoaPods
CocoaPods is a dependency manager for developing iOS or OSX apps, which automates and simplifies the process of using 3rd-party libraries in your projects. See the "Getting Started" guide for more information. You can install it with the following command:
$ gem install cocoapods
To integrate JWWaveView into your Xcode project using CocoaPods, simply add the following line to your Podfile:
Then, run the following command:
$ pod install
JWWaveView is available under the MIT license. See the LICENSE file for more info.