基于视图的应用中的水效应 [英] water effect in a view based application

查看:131
本文介绍了基于视图的应用中的水效应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在xcode中使用基于视图的应用程序,我想做一个效果:像这样的水效果视频。在这个视频中,这个家伙使用了opengl es我不知道它是否可能没有。

I'm using a view based application in xcode and I would like to do an effect: water effect like this video .In this video the guy use opengl es And I don't know it it's possible without.

推荐答案

以下代码用于水滴效果,

Following code is use for the water drop effect,

-(IBAction)btnActionTapped:(id)sender{
    CATransition *animation=[CATransition animation];
    [animation setDelegate:self];
    [animation setDuration:1.75];
    [animation setTimingFunction:UIViewAnimationCurveEaseInOut];
[animation setType:@"rippleEffect"];

    [animation setFillMode:kCAFillModeRemoved];
    animation.endProgress=0.99;

        imgV.hidden=YES;
        imgV2.hidden=NO;


    [animation setRemovedOnCompletion:NO];
    [self.view.layer addAnimation:animation forKey:nil];
}

这篇关于基于视图的应用中的水效应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆