UIPinchGestureRecognizer没有得到所谓的
问题描述:
,我真的不知道为什么当我这样做的目标是没有得到所谓:UIPinchGestureRecognizer没有得到所谓的
UIImage * imgSrc = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:imageSource]]];
UIImageView * imgView = [[[UIImageView alloc] initWithImage:imgSrc] retain];
UIPinchGestureRecognizer * pinchGestureRecognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(resizeImage:)];
[imgView addGestureRecognizer:pinchGestureRecognizer];
[pinchGestureRecognizer release];
- (IBAction)resizeImage:(UIPinchGestureRecognizer *)sender
{
//not getting here
}
调整大小的图像是没有得到调用。图像显示得很好
手势识别器初始化并添加到图像视图的方法是什么?何时将'imgView'添加到视图层次结构中? – 2012-01-12 20:59:39