3

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

4

1 回答 1

3

以下代码用于水滴效果,

-(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];
}
于 2012-02-21T12:30:19.500 回答