图片添加手势事件
注意:
imageView.userInteractionEnabled = YES;通过URLString获得image
-(void)setCodeUrlString:(NSString *)codeUrlString
{
//UTF-8编码
NSData *codeData =[NSData dataWithContentsOfURL:[NSURL URLWithString:[codeUrlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
UIImage *codeImg = [UIImage imageWithData:codeData];
[_codeImgView setImage:codeImg];
}