I m a currently working on gestures in an Iphone application
i used the touch gesture function which are working properly.
my touch gesture functions are working on an Image (Like Dragging) i want to ask is there a way to get the id of that image which is currently in touch gesture function
the touchMoved Function is like that
- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{
// Calculate and store offset, and pop view into front if needed
CGPoint pt = [[touches anyObject] locationInView:self];
startLocation = pt;
[[self superview] bringSubviewToFront:self];
}
// During movement, update the transform to match the touches
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
// Calculate offset
CGPoint pt = [[touches anyObject] locationInView:self];
float dx = pt.x - startLocation.x;
float dy = pt.y - startLocation.y;
CGPoint newcenter = CGPointMake(self.center.x + dx, self.center.y + dy);
// Remove Image (set Cordinated out of View)
if ((newcenter.x <= 9) || (newcenter.y >= 403)) {
//NSLog(@"Delete Image");
newcenter.x = 1000;
newcenter.y = 1000;
}
self.center = newcenter;
//
}