我尝试实现动画:
当您进入iPhone Gallery时,按该图像,您会看到全屏图像。在下面可以看到带有垃圾桶按钮的工具栏。当您按下此按钮时,图像将被动画删除。
我尝试实现这一点,但我不知道如何实现图像转换,苹果使用。
这是最好的,我可以做:

[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];
            }];
        }];
    }];

先感谢您。

更新
据我了解,我无法使用Core-Animation来制作该动画,但是可能有人可以建议我该动画与iPhone Gallery动画最相似,但无需使用OpenGL吗?

最佳答案

此时,您正在谈论的确切动画无法使用Core Animation或UIKit完成。您将需要使用OpenGL并将图像用作纹理,然后在其中进行动画处理。

关于iphone - 动画,就像从iPhone照片库中删除时一样,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/11136765/

10-11 15:31
查看更多