The method should be placed in the Appdelegate
-(void) Tomain
{
Initializing the Central view VC
[Self tabbarcontrollerinit];
Initialize left column Drawer view VC
Alranklistviewcontroller *leftviewcontroller = [[Alranklistviewcontroller alloc] Initwithnibname:nil Bundle:nil];
Set Drawer View VC
Self.mmdrawcontroller = [[Mmdrawercontroller alloc] Initwithcenterviewcontroller:_tabbarviewcontroller Leftdrawerviewcontroller:leftviewcontroller];
Set the drawer view VC function
//---------------------------------------------------------------------------------------------//
Set left View VC width
[Self.mmdrawcontroller Setmaximumleftdrawerwidth:kmaximumleftdrawerwidth];
Set left view VC open mode
[Self.mmdrawcontroller Setopendrawergesturemodemask:mmopendrawergesturemodeall];
Set left view VC off mode
[Self.mmdrawcontroller Setclosedrawergesturemodemask:mmclosedrawergesturemodeall];
Set Drawer view VC Shadow Effect
Self.mmDrawController.showsShadow = YES;
Set right swipe to open left column
[Mmexampledrawervisualstatemanager sharedmanager].leftdraweranimationtype = mmdraweranimationtypeslide;
Set the visualization status of the drawer VC?
[Self.mmdrawcontroller Setdrawervisualstateblock:
^ (Mmdrawercontroller *drawercontroller,
Mmdrawerside Drawerside,
CGFloat percentvisible)
{
Mmdrawercontrollerdrawervisualstateblock Block;
block = [[Mmexampledrawervisualstatemanager Sharedmanager]
Drawervisualstateblockfordrawerside:drawerside];
if (block) {
Block (Drawercontroller, drawerside, percentvisible);
}
}];
//---------------------------------------------------------------------------------------------//
Set the drawer view VC to the root VC.
Self.window.rootViewController = _mmdrawcontroller;
}
Mmdrawercontroller Drawer Sidebar Use example code