disable pointer when enlarged image is hidden

Change-Id: I6c637a4d8d8e0e3ffdeeb29ea98ca184d198355e
This commit is contained in:
siqi
2013-07-12 16:25:57 +02:00
parent 135cb84e76
commit 08225e9213
2 changed files with 52 additions and 48 deletions

View File

@@ -186,6 +186,7 @@
}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
if (!self.touchPointerImage.isHidden){
UITouch *touch = [[event allTouches] anyObject];
CGPoint loc = [touch locationInView:self.touchPointerImage];
if (loc.x >= 0 && loc.x <= self.touchPointerImage.frame.size.width
@@ -197,9 +198,11 @@
[self.movingPointer setHidden:NO];
}
}
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
if (!self.touchPointerImage.isHidden){
UITouch *touch = [[event allTouches] anyObject];
CGPoint loc = [touch locationInView:self.touchPointerImage];
if (loc.x >= 0 && loc.x <= self.touchPointerImage.frame.size.width
@@ -211,6 +214,7 @@
self.movingPointer.center = p;
}
}
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{