We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我感觉通过getCurrentVC方法,获取到的Controller 不一定是菜单所在的 Controller,也许是我用错了,希望作者能提出指导
getCurrentVC
代码位置:WMZDropDownMenu.m 文件的 menuTitle 方法里面,232 行
if([[WMZDropMenuTool getCurrentVC] respondsToSelector:@selector(viewWillDisappear:)] || [[WMZDropMenuTool getCurrentVC] respondsToSelector:@selector(viewDidDisappear:)]){ ///hook监听当前控制器消失 @MenuWeakSelf(self); [[WMZDropMenuTool getCurrentVC] aspect_hookSelector:@selector(viewWillDisappear:) withOptions:AspectOptionAutomaticRemoval usingBlock:^(id<AspectInfo> aspectInfo){ @MenuStrongSelf(self); if(!self.close){ self.hook = YES; [self closeView]; self.hook = NO; } } error:NULL]; [[WMZDropMenuTool getCurrentVC] aspect_hookSelector:@selector(viewDidDisappear:) withOptions:AspectOptionAutomaticRemoval usingBlock:^(id<AspectInfo> aspectInfo){ @MenuStrongSelf(self); if(!self.close){ self.hook = YES; [self closeView]; self.hook = NO; } } error:NULL]; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
我感觉通过
getCurrentVC
方法,获取到的Controller 不一定是菜单所在的 Controller,也许是我用错了,希望作者能提出指导代码位置:WMZDropDownMenu.m 文件的 menuTitle 方法里面,232 行
The text was updated successfully, but these errors were encountered: