我正在尝试通过长按手势来删除图像......问题是我可以在同一个视图上有多个图像。并且可能希望通过按住图像来删除每个图像。
所以可以说我有:
@property (nonatomic, retain) IBOutlet UIImageView *Image1;
@property (nonatomic, retain) IBOutlet UIImageView *Image2;
@property (nonatomic, retain) IBOutlet UIImageView *Image3;
都在同一个视图中。现在我按住 Image1。如何让 Longpress 手势知道我选择了 Image1 ?
- (void)handleDelete:(UILongPressGestureRecognizer *)recognizer {
//Something in here to detect image is selected and delete :)
}
谢谢!!!