I have to give a delete thumbnail animation in my ipad application just like iphone/ipad applications delete effect. Any body help me please sample photo is attached
If you need more details then kindly mention it in comments
Go to Settings > Accessibility > Motion. Turn on or off any of the following controls: Reduce Motion: Reduces the motion of the user interface, including the parallax effect of icons. Auto-Play Message Effects: Allows the Messages app to automatically play full-screen effects.
I have done this using CGAffineTransformMakeRotation
. Don't know there is some other better method. But What I have done is my logic you can copy that as it is and you just need to add a delete button on the left top of that view. In the following code I am just animating the thumbnail or any view just like iPad does on its home screen. One thing, You need to declare int direction globally. and every time when you will call this method you will set direction = 1;
-(void)shakeToDelete:(UIView *)shakeMe
{
[UIView animateWithDuration:0.1 animations:^
{
shakeMe.transform = CGAffineTransformMakeRotation(0.05 * direction);
}
completion:^(BOOL finished)
{
direction = direction * -1;
[self shakeToDelete:shakeMe];
}];
}
/// edit I tried this way and got it working in my sample screen as attached in photo
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