stefanoa / SASlideMenu

Library to create iOS sliding menu compatible with storyboards
568 stars 118 forks source link

How to disable panGasture in certain viewcontroller? #54

Closed chewzhijie closed 11 years ago

chewzhijie commented 11 years ago

I did implement

-(Boolean) disablePanGestureForIndexPath:(NSIndexPath*) indexPath;{}

in my viewcontroller which I wan to disable the panGesture.However , it wont work...

Did I need to return any BOLLEN Value or something to disable the slide?

stefanoa commented 11 years ago

You have to return NO for the indexPath of the menu item that you want to disable. If you do not want the pan gesture enabled for all the item in the menu simply implement:

-(Boolean) disablePanGestureForIndexPath:(NSIndexPath *)indexPath{
    return NO;
}
chewzhijie commented 11 years ago

OK.. Now my problem is this... I wan to enable the sliding in all my Menu index Path-Its all a TableView in the Main page, but how can I disable the panGesture in the deatilView of my main page?

stefanoa commented 11 years ago

The current implementation does not allow to dynamically disable the pan gesture, thus you should customize SASlideMenu to allow it.

stefanoa commented 11 years ago

You have to disable the pan gesture for the menu in order to use the pan gesture to drag annotations.

jsealey commented 11 years ago

This is the same problem I was having, the best you can do is cuztomize the SASlideMenu like stefanoa mentions. Here is a link to the code I used for recognizing tableview controllers and disabling the slide gesture https://github.com/stefanoa/SASlideMenu/issues/49#issuecomment-14757070