开发者

Ripple Effect on ipad

开发者 https://www.devze.com 2023-03-12 04:32 出处:网络
I want to create a rippl开发者_StackOverflow中文版e effect on a UIImageView from the point where user touches on the screen. what is the best and simple method for doinf this. Please look at this ques

I want to create a rippl开发者_StackOverflow中文版e effect on a UIImageView from the point where user touches on the screen. what is the best and simple method for doinf this.


Please look at this question.

Hope it helps


- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    NSSet *allTouches = [event allTouches];
    UITouch *touch = [[event allTouches] anyObject];        
    CGPoint lastPoint = [touch locationInView:self.view];   
    //animation code
}

Using above method you have set UIimageView center on lastPoint and play your animation code. It will work that u want.

0

精彩评论

暂无评论...
验证码 换一张
取 消