ECSlidingViewController / ECSlidingViewController

Customizable sliding view controller container.
MIT License
4.32k stars 817 forks source link

Giving Pan Gesture to Under Left/Right Controllers #79

Closed manojthomas88 closed 11 years ago

manojthomas88 commented 11 years ago

I need to have nested sliding views (underLeft for underLeft). So i used ECSlidingViewController itself as underLetfController and working fine. But the problem is, I cant give pan gesture to underControllers. I want to swipe to see the underLeftController(TopController for underLeft of main ECSlidingViewController). But cant implement it.

nCore commented 11 years ago

I have the same issue. Namely:

when I try to add gestureRecognizer with [self addGestureRecognizer:self.slidingViewController.panGesture] I got this:

frame #1: 0x34ed4c6c CoreFoundation`-[__NSArrayM insertObject:atIndex:] + 776
frame #2: 0x3384447e UIKit`-[UIView(UIViewGestures) addGestureRecognizer:] + 178

A big thrown exception because of that the self.slidingViewController.panGesture is null.

What am I missing?

manojthomas88 commented 11 years ago

Found solution myself. In this case, self.slidingViewController in underViewControllers represents its own view controller and if we need to give pan gesture, we really need to give it to upper Controller. So self.slideViewController.slideViewController addGestureRecognizer done it for me...

hackin247 commented 11 years ago

Check your slidingViewController in the debugger and make sure it is not nil by the time you get to adding the gesture recognizer. If it is, your slidingViewController is not properly defined and initialized.

enriquez commented 11 years ago

ECSlidingViewController wasn't meant to be used this way, but I guess it should work in theory. Anyways, looks like you figured it out.