抽屉视图(MMDrawerController使用)
1、初始化MMDrawerController,用这个controller装载我们的不同视图控制器
MMDrawerController* drawerController = [[MMDrawerController alloc]
initWithCenterViewController:controller1 leftDrawerViewController:controller2];
controller1是主视图,controller2是左侧视图
2、为drawerController添加打开抽屉和关闭抽屉的手势
drawerController.openDrawerGestureModeMask = MMOpenDrawerGestureModePanningCenterView;
drawerController.closeDrawerGestureModeMask = MMCloseDrawerGestureModePanningCenterView;
3、打开抽屉
[drawerController toggleDrawerSide:MMDrawerSideLeft animated:YES completion:nil];
执行这个方法可以打开左侧抽屉视图,一般用作点击事件