Closed ekhall closed 11 years ago
Hi!
Do you use an UITableViewController
subclass as the content view controller of the slide menu?
I suggest you to implement -viewDidSlideIn:inSlideMenuController:
and set panGestureEnabled
to NO
; and implement -viewDidSlideOut:inSlideMenuController:
and set panGestureEnabled
to YES
.
I've not considered the fact that the content view controller's view could be an UITableView
with its own pan gesture. I'll work on it ;-)
I just did a branch in order to test the behavior you describe.
Can you try the table view controller demo in the demos/table-view-controller
branch ? (https://github.com/nverinaud/NVSlideMenuController/tree/demos/table-view-controller)
I implemented multiple gesture recognition but I'm not entirely satisified with this behavior since the shadow does not "scroll" with the table view. I would suggest not to set a UITableViewController
as a content view controller of the slide menu for now (you can embed one inside a navigation controller and hide the nav bar as a workaround).
You're right - didn't notice that about the shadow until I went looking at it though. Rather - the thing that caught my attention first was that any horizontal component to the scroll of the tableview resulted in the sideways pan of the VC. Seems really sensitive at the moment.
To answer your questions above: I was using a UITableViewController as the primary class (not subclassed) but not inside a NavigationController. I'll try messing around with those methods.
Thanks for the thoughts and great coding. K
As far as tricks go - embedding the UITableViewController inside a Nav controller and hiding the navigation bar it's about as straightforward and elegant as can be - works well. Thank you!
Love the code!
It's so sophisticated I must be misunderstanding this. When my top view controller contains a tableview I'm unable to scroll the tableview up and down while panGestureEnabled is YES.
When the top tableview comes into view I can set the panGestureEnabled to NO in the viewDidLoad to re-establish the ability to scroll the tableview.
Is there a way for NVSlideMC to differentiate between vertical scrolling and left to right swipes? So vertical scrolling would be passed through to the tableview and horizontal scrolling would allow the pan and underlying VC to show again?
My only thought it so add another gesture recognizer on my tableview VC and turn on panGestureEnabled again if a horizontal swipe is detected - but this seems like a hack.