diff --git a/Pod/Classes/ToucheableScrollView.h b/Pod/Classes/ToucheableScrollView.h new file mode 100755 index 0000000..8660c8e --- /dev/null +++ b/Pod/Classes/ToucheableScrollView.h @@ -0,0 +1,13 @@ +// +// ToucheableScrollView.m +// Pods +// +// Created by Giuseppe Nucifora on 28/01/16. +// +// + +#import + +@interface ToucheableScrollView : UIScrollView + +@end diff --git a/Pod/Classes/ToucheableScrollView.m b/Pod/Classes/ToucheableScrollView.m new file mode 100755 index 0000000..f257427 --- /dev/null +++ b/Pod/Classes/ToucheableScrollView.m @@ -0,0 +1,36 @@ +// +// ToucheableScrollView.m +// Pods +// +// Created by Giuseppe Nucifora on 28/01/16. +// +// + +#import "ToucheableScrollView.h" + +@implementation ToucheableScrollView + +- (void) touchesEnded: (NSSet *) touches withEvent: (UIEvent *) event +{ + // If not dragging, send event to next responder + if (!self.dragging) { + if ([self.nextResponder respondsToSelector:@selector(touchesEnded:withEvent:)]) { + [self.nextResponder touchesEnded: touches withEvent:event]; + } + if ([self.nextResponder.nextResponder respondsToSelector:@selector(touchesEnded:withEvent:)]) { + [self.nextResponder.nextResponder touchesEnded: touches withEvent:event]; + } + if ([self.nextResponder.nextResponder.nextResponder respondsToSelector:@selector(touchesEnded:withEvent:)]) { + [self.nextResponder.nextResponder.nextResponder touchesEnded: touches withEvent:event]; + + } + } + else { + [super touchesEnded: touches withEvent: event]; + } + +} +@end + + +