iOS 圖片點擊放大, 再次點擊縮小
阿新 • • 發佈:2017-07-03
mage 點擊事件 can edi 點擊 ini 一個 cli spa
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];
}
iOS 圖片點擊放大, 再次點擊縮小