// Begin Animation "suckEffect".
CATransition* animation = [CATransition animation];
animation.type = @"suckEffect";
animation.duration = 1.0f;
animation.timingFunction = UIViewAnimationCurveEaseInOut;
myView.opaque = 1.0f;
[myView.layer addAnimation:animation forKey:@"transitionViewAnimation"];
How you can see I write a part of code witch make an animated when I press delete button. When I press delete button in my application the "suckEffect" take place. But it goes to left corner of the screen. I want to ask you if anybody know how can I do this effect but for left corner of my iphone screen !!!
You can use the undocumented +[UIView setAnimationPosition:] . Beware that the suckEffect is undocumented and Apple will reject apps using it. Same for setAnimationPosition:
.
If you don't want to violate apple store rules, you could use a third party library to do the effect, for instance:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.