Permalink
Browse files

Limiting custom UIScrollView behavior tom MBPullDownController.

  • Loading branch information...
matej committed Apr 2, 2013
1 parent 897f2aa commit 4c36f737ad075a5381e5d791358b382d4e553a15
Showing with 4 additions and 1 deletion.
  1. +4 −1 MBPullDownController/MBPullDownController.m
@@ -18,6 +18,8 @@
static CGFloat const kDefaultOpenDragOffset = 100.f;
static CGFloat const kDefaultCloseDragOffset = 44.f;
+static NSInteger const kContainerViewTag = -1000001;
+
@interface MBPullDownController ()
@@ -63,6 +65,7 @@ - (void)sharedInitialization {
- (void)viewDidLoad {
[super viewDidLoad];
+ self.view.tag = kContainerViewTag;
[self changeBackControllerFrom:nil to:self.backController];
[self changeFrontControllerFrom:nil to:self.frontController];
}
@@ -403,7 +406,7 @@ - (UIView *)MBPullDownControllerHitTest:(CGPoint)point withEvent:(UIEvent *)even
@implementation UIScrollView (MBPullDownControllerHitTest)
- (UIView *)MBPullDownControllerHitTest:(CGPoint)point withEvent:(UIEvent *)event {
- if (point.y <= 0.f) {
+ if (point.y <= 0.f && self.superview.tag == kContainerViewTag) {
return nil;
}
return [self MBPullDownControllerHitTest:point withEvent:event];

0 comments on commit 4c36f73

Please sign in to comment.