Merge branch 'master' of git.giuseppenucifora.com:giuseppenucifora/ToucheableScrollView

* 'master' of git.giuseppenucifora.com:giuseppenucifora/ToucheableScrollView:
  no message
  - Release 0.1.0
  Initial commit

# Conflicts:
#	.travis.yml
#	Example/Podfile
#	Example/Podfile.lock
#	Example/Pods/Manifest.lock
#	Example/Pods/Pods.xcodeproj/project.pbxproj
#	Example/Tests/Tests.m
#	README.md
This commit is contained in:
Giuseppe Nucifora 2016-01-29 12:34:47 +01:00
commit 1ee7fcdb6a
2 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,13 @@
//
// ToucheableScrollView.m
// Pods
//
// Created by Giuseppe Nucifora on 28/01/16.
//
//
#import <UIKit/UIKit.h>
@interface ToucheableScrollView : UIScrollView
@end

View File

@ -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