Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/120.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 无法更改self.navigationController.interactiveEPGESTureRecognitor.delegate_Ios_Objective C - Fatal编程技术网

Ios 无法更改self.navigationController.interactiveEPGESTureRecognitor.delegate

Ios 无法更改self.navigationController.interactiveEPGESTureRecognitor.delegate,ios,objective-c,Ios,Objective C,我正在使用TWTSideMenuViewController self.navigationController.interactivePopGestureRecognizer.delegate=self; [self.navigationController.interactivePopGestureRecognizer addTarget:self action:@selector(openMenu)]; -(void)openMenu{ [self.sideMenuViewControl

我正在使用TWTSideMenuViewController

self.navigationController.interactivePopGestureRecognizer.delegate=self;
[self.navigationController.interactivePopGestureRecognizer addTarget:self action:@selector(openMenu)];

-(void)openMenu{
[self.sideMenuViewController openMenuAnimated:YES completion:nil];
}

问题是,我只希望它在根viewController中打开

在导航堆栈中的任何其他位置,它都应弹出到上一个viewController

self.navigationController.interactivePopGestureRecognizer.delegate=self;
[self.navigationController.interactivePopGestureRecognizer addTarget:self action:@selector(openMenu)];

-(void)openMenu{
[self.sideMenuViewController openMenuAnimated:YES completion:nil];
我已尝试将另一个viewController设置为InteractiveEPPGestureRecognizer.delegate,并将其注册到@SelectorOptoViewController:, 但它仍然弹出我的侧菜单打开,除了弹出回到以前的VC

我尝试了self.navigationController.InteractiveEPGESTureRecognitor.delegate=nil;

当我的rootViewController消失时,它仍然弹出侧菜单打开