UIImage *img = [UIImage imageWithContentsOfFile:@"/Users/jinhui005/Desktop/style_img.png"];
UIImageView *imgView = [[UIImageView alloc] initWithImage:img];
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(clickImage)];
[imgView addGestureRecognizer:tapGesture];
imgView.userInteractionEnabled = YES;
网友评论