滚动停止使用MMDrawer iOS目标c

时间:2016-12-28 10:41:41

标签: ios objective-c uiscrollview mmdrawercontroller

我在我的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打开/关闭。 当我滚动滚动视图项目时,滚动停止并打开菜单。 任何帮助??

1 个答案:

答案 0 :(得分:0)

我得到了解决方案。在我的代码中我的UIScrollView框架的内容大小有问题。