我在我的 ViewController 上使用 UIScrollView 并且还使用了 MMDrawerController
实施如下:
UIStoryboard * storyboard=[UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController * leftVC=[storyboard instantiateViewControllerWithIdentifier:@"LeftSideDrawer"];
UIViewController * centerVC=[storyboard instantiateViewControllerWithIdentifier:@"ViewController"];
UINavigationController * leftNav=[[UINavigationController alloc]initWithRootViewController:leftVC];
UINavigationController * centerNav=[[UINavigationController alloc]initWithRootViewController:centerVC];
self.drawerController = [[MMDrawerController alloc]
initWithCenterViewController:centerNav
leftDrawerViewController:leftNav
rightDrawerViewController:nil];
CGFloat menuWidth = [UIScreen mainScreen].bounds.size.width * 0.8;
[self.drawerController setMaximumLeftDrawerWidth:menuWidth];
[self.drawerController setOpenDrawerGestureModeMask:MMOpenDrawerGestureModeAll];
[self.drawerController setCloseDrawerGestureModeMask:MMCloseDrawerGestureModeAll];
[self.window setRootViewController:self.drawerController];
[self.window makeKeyAndVisible];
我在 ViewController 上实现 UIScrollView,有时滚动视图停止并且 MMDrawer 是打开的。如何使用 UIScrollView 处理 MMDrawer 打开/关闭。当我试图滚动滚动视图项目时,滚动停止并打开菜单。有什么帮助吗??