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:
commit
1ee7fcdb6a
13
Pod/Classes/ToucheableScrollView.h
Executable file
13
Pod/Classes/ToucheableScrollView.h
Executable file
@ -0,0 +1,13 @@
|
||||
//
|
||||
// ToucheableScrollView.m
|
||||
// Pods
|
||||
//
|
||||
// Created by Giuseppe Nucifora on 28/01/16.
|
||||
//
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface ToucheableScrollView : UIScrollView
|
||||
|
||||
@end
|
||||
36
Pod/Classes/ToucheableScrollView.m
Executable file
36
Pod/Classes/ToucheableScrollView.m
Executable 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
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user