From 57eefdc648f4da818372587b59c72f998a85cd2d Mon Sep 17 00:00:00 2001 From: Baldoph Pourprix Date: Wed, 8 Apr 2015 15:20:21 +0200 Subject: [PATCH] Shifted tracked content by -15pt for better legibility --- RSColorPicker/ColorPickerClasses/RSColorPickerView.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/RSColorPicker/ColorPickerClasses/RSColorPickerView.m b/RSColorPicker/ColorPickerClasses/RSColorPickerView.m index db012e2..f0e0847 100755 --- a/RSColorPicker/ColorPickerClasses/RSColorPickerView.m +++ b/RSColorPicker/ColorPickerClasses/RSColorPickerView.m @@ -418,6 +418,7 @@ - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { } CGPoint point = [touches.anyObject locationInView:self]; + point = CGPointMake(point.x, point.y - 15); [self updateStateForTouchPoint:point]; if ([self.delegate respondsToSelector:@selector(colorPicker:touchesBegan:withEvent:)]) { @@ -427,12 +428,14 @@ - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { - CGPoint point = [[touches anyObject] locationInView:self]; + CGPoint point = [touches.anyObject locationInView:self]; + point = CGPointMake(point.x, point.y - 15); [self updateStateForTouchPoint:point]; } - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { - CGPoint point = [[touches anyObject] locationInView:self]; + CGPoint point = [touches.anyObject locationInView:self]; + point = CGPointMake(point.x, point.y - 15); [self updateStateForTouchPoint:point]; [self.loupeLayer disappear];