iOS 图片点击放大, 再次点击缩小

XWScanImage  是一个自定义的类, 评论留Q 发

 

 ImageView = [[UIImageView alloc]init];

    

    ImageView.backgroundColor = SetColor(160, 160, 160);

    //为UIImageView1添加点击事件

    UITapGestureRecognizer *tapGestureRecognizer1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(scanBigImageClick1:)];

    [ImageView addGestureRecognizer:tapGestureRecognizer1];

 

#pragma mark 图片的点击放大缩小

-(void)scanBigImageClick1:(UITapGestureRecognizer *)tap{

    NSLog(@"点击图片");

    UIImageView *clickedImageView = (UIImageView *)tap.view;

    [XWScanImage scanBigImageWithImageView:clickedImageView];

}

 

posted @ 2017-07-03 15:23  陈伟的博园  阅读(2840)  评论(3编辑  收藏  举报