绘制UIImageView xCode的UIImage内部

时间:2014-09-12 10:19:46

标签: ios uiimageview uiimage xcode5

我有一个简单的绘图工具,一个带有AspectFit的UIImageView,它不是完整的窗口,而是在ImageView中的UIImage。

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    UITouch *touch = [[event allTouches] anyObject];

    if ([touch tapCount] == 2) {
        _imageView2.image = _introImage2;
    }
    location = [touch locationInView:touch.view];
    lastClick = [NSDate date];
    lastPoint = [touch locationInView:self.imageView2];
    lastPoint.y -= 0;
    [super touchesBegan: touches withEvent: event];

}

如果UIImageView是全窗口,这项工作是正确的。如何仅为UIImageView设置UITouch?

0 个答案:

没有答案