I want to remove an item (lets say a UIButton) from my iPhone application. I want to add some animation when i tap on the button to remove it.
This is the animation i want:
In your OSX dock, if you right-click on an item and tap on *remove from dock*,
it kinda like **explodes** with a funny noise, and removes itself from that dock.
Any knows how to do that smoke (or) tiny explosion animation on the iPhone ?? Is there a pre-defined name for it ?
Believe it or not, there's an API for exactly that on Mac OS X:
NSPoint centrePoint = ...;
NSSize size = ...;
NSShowAnimationEffect(NSAnimationEffectPoof, centrePoint, size, nil, NULL, NULL);
On iOS, there isn't because the animation is a Mac-specific animation. On iOS, one typically sees the deleted object collapse into a point. That animation can be done by animating the transform of a view (using CAAnimation or the UIView class methods) so that it scales to nothingness.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With