简体   繁体   English

如何在iPhone的左下角制作“suckEffect”?

[英]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.

相关问题 在左上角做一个重新加载按钮 - Make a reloadbutton on left corner iPhone:如何获取 UIView 的左上角坐标? - iPhone: How to get top left corner coordinate of a UIView? 如何在 iPhone 中制作两侧圆角 UITextField? - How to make Two side round corner UITextField in iPhone? 如何在iPhone应用程序中将导航控制器的后退按钮对齐到其左角 - How to align back button of the navigation controller to its left corner in iphone application 如何在Iphone +上仅在表格视图自定义单元的左上角和右上角半径 - How to corner radius only top left and top right of table view custom cell on Iphone + 在ios Emulator / IPhone5中,在左上角设置UIView损坏了吗? - Setting UIView on the left top corner is broken in ios Emulator/IPhone5? 如何使 UIBezierPath 从视图中间开始(目前它是从视图的左角开始) - How to make UIBezierPath to start from mid of view (currently it is starting from left corner side of view) 如何在UITextView的左上角粘贴cursor position? - How to stick the cursor position on the left corner in UITextView? 如何在ios中将图像添加到uicollectionView单元的左上角? - How to add the image to top-left corner of uicollectionView cell in ios? iPhone - 键盘角按钮 - iPhone - Keyboard corner button
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM