Note that there are some explanatory texts on larger screens.

plurals
  1. POAnimation, like when you delete from iPhone Photo Gallery
    text
    copied!<p>I try to implement the animation: when you enter iPhone Gallery, press the image, you see full-screen image. Below you can see toolbar with trash button. When you press this button, the image is being deleted with animation. I try to implement this, but I don't know, how to implement the transform of image, apple use. This is the best, I could do:</p> <pre><code>[UIView transitionWithView:self.view duration:0.1 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{ [self.view addSubview:scrollImageView]; } completion:^(BOOL finished) { [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionAllowUserInteraction animations:^{ CGRect frame = scrollImageView.frame; frame.size = CGSizeMake(frame.size.width * 0.75, frame.size.height * 0.75); frame.origin = CGPointMake((size.width - frame.size.width) / 2, (size.height - frame.size.height) / 2); scrollImageView.frame = frame; } completion:^(BOOL finished) { [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionAllowUserInteraction animations:^{ CGRect frame = scrollImageView.frame; frame.size = CGSizeMake(frame.size.width * 0.05, frame.size.height * 0.05); frame.origin = CGPointMake(size.width, size.height); scrollImageView.frame = frame; CGAffineTransform transform = scrollImageView.transform; CGAffineTransform rotatedTransform = CGAffineTransformRotate(transform, 45 * 3.14 / 180); scrollImageView.transform = rotatedTransform; } completion:^(BOOL finished) { [scrollImageView removeFromSuperview]; }]; }]; }]; </code></pre> <p>Thank you in advance.</p> <p><strong>Update</strong> As I understand, I can't do this animation with Core-Animation, but may anyone can advice me the animation the most simular to iPhone Gallery animation, but without using OpenGL?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload