override hitTest:withEvent
method
signature
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
Above method is supplied with CGPoint which is the location of touch.Create a CGPoint class property and store the touch-location in it.
@property (nonatomic,assign) CGPoint previousTouch;
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event{
self.previousTouch = point;
return [super hitTest:point withEvent:event];
}