Add smooth water waves to your views.

Overview

WXWaveView

Add pretty and smooth waves to your views!

The wave can be added to any type of view.

中文说明

e.g.

Integration

Cocoapods:

pod 'WXWaveView'

Or Carthage:

github "WelkinXie/WXWaveView"

How to use

  1. Initialize WXWaveView with method " addToView:withFrame: "

     self.waveView = [WXWaveView addToView:headerView withFrame:CGRectMake(0, CGRectGetHeight(headerView.frame) - 10, CGRectGetWidth(headerView.frame), 10)];
    

    Of course, you can just give CGRectZero to the method above and use Auto Layout to define its frame.

  2. Perform the method wave when you want it to animate.

     [self.waveView wave];
    

That's it!

Customization

  1. The time when the wave lasts. When it is set to zero, the wave will never stop. Default is 1.5.

     self.waveView.waveTime = 0.f;  
    
  2. The color of the wave. Default is white.

     self.waveView.waveColor = [UIColor groupTableViewBackgroundColor];
    
  3. The speed of the wave. Default is 9.

     self.waveView.waveSpeed = 20.f;
    
  4. The angular speed of the wave. Default is 2.

     self.waveView.angularSpeed = 1.8f;
    
  5. You can also stop the wave manually with the method stop whenever you want.

     [self.waveView stop];
    

Recently I find it amusing to make it a loading view :

What will it be depends on your creativity! Have fun :]

Reference

WXWaveView is inspired by KYWaterWaveView. Thanks KittenYang and his contributions.

License

WXWaveView is released under MIT License.

You might also like...
Gravity is a simple Swift Package Manager to add gravity to UI objects easily.
Gravity is a simple Swift Package Manager to add gravity to UI objects easily.

Gravity -- Gravity is a simple Swift Package to add gravity to UI objects easily. -- How to use: Add a new Swift Package from XCode and paste the url

An easy way to add a simple, shimmering effect to any view in an iOS app.
An easy way to add a simple, shimmering effect to any view in an iOS app.

Shimmer Shimmer is an easy way to add a shimmering effect to any view in your app. It's useful as an unobtrusive loading indicator. Shimmer was origin

MotionBlur allows you to add motion blur effect to iOS animations.
MotionBlur allows you to add motion blur effect to iOS animations.

MotionBlur MotionBlur allows you to add motion blur effect to your animations (currently only position's change). See the accompanying blog post to le

An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.

LoadingShimmer An easy way to add a shimmering effect to any view with just single line of code. It is useful as an unobtrusive loading indicator. Thi

SwiftUI Animation Library. Useful SwiftUI animations including Loading/progress, Looping, On-off, Enter, Exit, Fade, Spin and Background animations that you can directly implement in your next iOS application or project. The library also contains huge examples of spring animations such as Inertial Bounce, Shake, Twirl, Jelly, Jiggle, Rubber Band, Kitchen Sink and Wobble effects. Browse, find and download the animation that fits your needs. ViewAnimator brings your UI to life with just one line
ViewAnimator brings your UI to life with just one line

ViewAnimator is a library for building complex iOS UIView animations in an easy way. It provides one line animations for any view included the ones wh

YapAnimator is your fast and friendly physics-based animation system
YapAnimator is your fast and friendly physics-based animation system

YapAnimator is your fast and friendly physics-based animation system. YapAnimator was built with ease-of-use in mind, keeping you sane and your design

A UICollectionViewLayout subclass that adds custom transitions/animations to the UICollectionView without effecting your existing code.
A UICollectionViewLayout subclass that adds custom transitions/animations to the UICollectionView without effecting your existing code.

AnimatedCollectionViewLayout Normally a UICollectionView has no transition effects when you scroll from one item to another. There are lots of ways to

A travel companion for your apps, a solitaire friend for Walker
A travel companion for your apps, a solitaire friend for Walker

A travel companion for your apps, a solitaire friend for Walker. This library aims to make the job of using day to day animations easier, just with on

Comments
  • Cocoapods update request

    Cocoapods update request

    Please update WXWaveView cocoapod with the recent changes. I'm using this pod in one of my projects. If you don't have time to update the pod, you can give me write access to update the pod for you. Thank you

    opened by Asifnewaz 2
  • waveColor setter method implemented

    waveColor setter method implemented

    I'm using WXWaveView in a UICollectionViewCell, and I just want to update the wave color for each cell without calling wave method.
    As collectionView reuses cells, wave color was not updating because WXWaveView's instance was created inside init coder. So while reusing the cell wave color was not updating. For that reason, I've added this setter method for to update wave color

    opened by Asifnewaz 0
Owner
Welkin Xie
Welkin Xie
Create a smooth transition between any two SwiftUI Views

GZMatchedTransformEffect Create a smooth transition between any two SwiftUI Views. It is very similar to the built-in .matchedGeometryEffect() modifie

Gong Zhang 10 Nov 26, 2022
Simple calculation to render cheap water effects.

Water Simple calculation to render cheap water effects. This simple project demonstrates : how to use Metal draw compute shader, or known as 'kernal f

Xue Yu 381 Sep 20, 2022
Simple water drops animation 💧

WaterDrops Simple water drops animation ?? Example override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = U

Oh Hyungjun 403 Nov 10, 2022
Water Ripple Animation Demonstration

WaterRippleAnimationDemonstration Water Ripple Animation Demonstration From the

AndyLan 2 Apr 5, 2022
ChainPageCollectionView A custom View with two level chained collection views and fancy transition animation

ChainPageCollectionView A custom View with two level chained collection views and fancy transition animation. Demo Requirements iOS 9.0+ Xcode 8 Insta

Yansong Li 775 Dec 7, 2022
FloatingBubbles is a customizable views that float like zero gravity animation.

Floating Bubbles FloatingBubbles is a customizable views that float like zero gravity animation. $ pod try FloatingBubbles Features Create Multiple V

Chandan Sharda 18 Oct 11, 2022
An Objective-C animation library used to create floating image views.

JRMFloatingAnimation [![CI Status](http://img.shields.io/travis/Caroline Harrison/JRMFloatingAnimation.svg?style=flat)](https://travis-ci.org/Caroline

Caroline Harrison 233 Dec 28, 2022
Various view's effects for iOS, written in Swift. Allows you to animate views nicely with easy to use extensions

Various view's effects for iOS, written in Swift. Allows you to animate views nicely with easy to use extensions. Every animation is randomized. Currently supported animations:

Artur Rymarz 23 Aug 23, 2022
jasu 29 Dec 20, 2022
iOS framework for impressive transition animations between views.

CoreTransition iOS framework for impressive transition animations between views. Built using Swift, and supports a lot of animations to navigate to a

Ahmed Abdelkarim 4 Nov 17, 2022