1.通過上下文獲取當前圖片
2.動態(tài)添加一個UIImageView
3.計算目標位置的frame 做屬性動畫
4.動畫完畢移除imageVIew,創(chuàng)建對應的圖片查看器(未實現(xiàn))
UIGraphicsBeginImageContextWithOptions(self.imageView.bounds.size, YES, 0);
[self.imageView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * image = UIGraphicsGetImageFromCurrentImageContext();
UIImageView * coverView = [[UIImageView alloc] initWithImage:image];
coverView.frame = self.imageView.frame;
[self.view addSubview:coverView];
CGFloat w = [UIScreen mainScreen].bounds.size.width;
CGFloat h = w / coverView.bounds.size.width * coverView.bounds.size.height;
[UIView animateWithDuration:4 animations:^{
coverView.frame = CGRectMake(([UIScreen mainScreen].bounds.size.width - w) * 0.5, ([UIScreen mainScreen].bounds.size.height - h) * 0.5, w, h);
} completion:^(BOOL finished) {
[coverView removeFromSuperview];
}];