Code Monkey home page Code Monkey logo

wxwaveview's Introduction

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.

wxwaveview's People

Contributors

asifnewaz avatar welkinxie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

wxwaveview's Issues

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.