//缩略图点击出现大图
- (void)handleGesture:(UITapGestureRecognizer *)gesture
{
UIImageView *imageView = [UIImageView
new];
imageView.bounds =
self.imagView_Pic.frame;
imageView.image =
self.imagView_Pic.image;
CGPoint point = [gesture
locationInView:self.superview.superview.superview];
self.point =
CGPointMake(768-point.y, point.x);
imageView.center =
self.point;
imageView.transform =
CGAffineTransformMakeRotation(M_PI_2);
imageView.userInteractionEnabled =
YES;
UITapGestureRecognizer *gesture1 = [[UITapGestureRecognizer
alloc] initWithTarget:self
action:@selector(handleGesture1:)];
[imageView
addGestureRecognizer:gesture1];
[self.window
addSubview:imageView];
[UIView
animateWithDuration:0.5
animations:^{
imageView.frame =
CGRectMake(0,
0, 768,
1024);
}];
}
//全屏图片点击后回复到缩略图
- (void)handleGesture1:(UITapGestureRecognizer *)gesture
{
UIView *view = gesture.view;
[UIView
animateWithDuration:0.5
animations:^{
view.bounds =
self.imagView_Pic.frame;
view.center =
self.point;
}
completion:^(BOOL finished) {
[view removeFromSuperview];
}];
}