[英]How to make “suckEffect” to the left corner of iPhone?
// 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.
当我在我的应用程序中按下删除按钮时,会发生“suckEffect”。 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 !!!
我想问你是否有人知道我怎么能做这个效果,但我的iPhone屏幕的左角!
You can use the undocumented +[UIView setAnimationPosition:] . 您可以使用未记录的+ [UIView setAnimationPosition:] 。 Beware that the suckEffect is undocumented and Apple will reject apps using it.
请注意suckEffect未记录,Apple将拒绝使用它的应用程序。 Same for
setAnimationPosition:
. setAnimationPosition:
。
If you don't want to violate apple store rules, you could use a third party library to do the effect, for instance: 如果您不想违反Apple商店规则,可以使用第三方库来执行此操作,例如:
https://github.com/Ciechan/BCGenieEffect https://github.com/Ciechan/BCGenieEffect
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.