• Stars
    star
    153
  • Rank 243,368 (Top 5 %)
  • Language
    Objective-C
  • Created about 9 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This demo mimics the effect of the drop of water, in Objective-c

WaterDropViewDemo


This code mimics the effect of the drop of water:

And the origin design is from designer Vadim Gromov, here is Gromov's dribbble. The original design is as follows:

image

How to use the demo?

The main functions are implemented in the file WaterDropView.m inside. You can also see some interesting things in another file ViewController.m.

If you want to use the effect in your own code, you can do the following (suppose you add the following code in a controller.):

WaterDropView *waterDropView = [[WaterDropView alloc] initWithFrame:self.view.bounds];
[self.view addSubview:waterDropView];
[waterDropView play];

Here's a more deailed tutorial: click me

License

WaterDropViewDemo is published under MIT License. See the LICENSE file for more.