How to make "suckEffect" in the left corner of the 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"]; 

As you can see, I am writing a piece of code that makes it animated when I click the delete button. When I click the delete button in my application, "suckEffect" happens. But he goes to the left corner of the screen. I want to ask you if anyone knows how I can make this effect, but for the left corner of my iphone screen !!!

+2
source share
2 answers

You can use undocumented + [UIView setAnimationPosition:] . Remember that suckEffect is undocumented and Apple will reject applications that use it. Same thing for setAnimationPosition:

+5
source

If you do not want to violate the rules of the Apple store, you can use a third-party library to perform the effect, for example:

https://github.com/Ciechan/BCGenieEffect

+3
source

Source: https://habr.com/ru/post/1381400/


All Articles