簡體   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"];

當我按下刪除按鈕時,你怎么看我編寫了一部分代碼。 當我在我的應用程序中按下刪除按鈕時,會發生“suckEffect”。 但它會進入屏幕的左下角。 我想問你是否有人知道我怎么能做這個效果,但我的iPhone屏幕的左角!

您可以使用未記錄的+ [UIView setAnimationPosition:] 請注意suckEffect未記錄,Apple將拒絕使用它的應用程序。 setAnimationPosition:

如果您不想違反Apple商店規則,可以使用第三方庫來執行此操作,例如:

https://github.com/Ciechan/BCGenieEffect

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM