Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Nesting multiple pull down controllers not working - why? #4

leviathan opened this Issue Mar 15, 2013 · 2 comments


None yet
2 participants

I've tried to add multiple pull down controllers to a navigation controller.

You can find my sample here: https://dl.dropbox.com/u/2668924/pulldown.zip

Looking at my sample project - when you select a cell and the (in the second pull down controller) try to scroll the table in the back.
It's not working, only the front controller is responding.

Any ideas?

Screen Shot 2013-03-15 at 23 02 14


matej commented Mar 18, 2013

Good catch. I's a problem with method swizzling. Creating two MBPullDownControllers, without destroying the first one first, invokes swizzleHitTestForScrollView:revert: twice, which essentially un-swizzles everything. This way every second controller in your hierarchy doesn't work.

Method swizzling is unfortunately required at this point to get UIScrollView (and it's subclasses like UITableView), to ignore touches outside of the content frame (see MBPullDownControllerHitTest:withEvent:).

I'm working on a different layout that won't require any method swizzling, but I'll probably take a week or two before I manage to find enough time to finish this (assuming I succeed). A temporary solution would be to do the method swizzling just once and never revert (subclass MBPullDownController and override swizzleHitTestForScrollView:revert:, wrapping the super call in a dispatch once block).

@matej matej closed this in 3e9b893 Apr 2, 2013

Nice! I can confirm that your fix works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment