1. If you are not introducing the Mmdrawercontroller framework in Appdelegate, then be aware of the acquisition of objects in the view controller that needs to be clicked.
Tag View Controller in engineering
Maintabbarviewcontroller *tabbarcontroller = [[maintabbarviewcontroller alloc] init];
// Initialize view Controller
leftdrawcontroller *leftdrawercontroller = [[leftdrawcontroller alloc] init ];//left View
*home = [[homeviewcontroller alloc] init];
newviewcontroller *new = [[newviewcontroller alloc] init];
mapviewcontroller *map = [[mapviewcontroller alloc] init];
moreviewcontroller *more = [[moreviewcontroller alloc] init];//Several main interfaces can have left drawer effect
// store in array
nsarray *array = @[home,new,map,more];
nsmutablearray *navigationarray = [nsmutablearray array];
// Create navigation bar
for(int i = 0; i < array. Count; i + +) {
uinavigationcontroller *nav = [[uinavigationcontroller alloc] Initwithrootviewcontroller: Array[i]];
[Navigationarray addobject: nav];
}
Tabbarcontroller. viewcontrollers = navigationarray;
// Set Center view and Zola view
self. Drawercontroller = [[mmdrawercontroller alloc] initwithcenterviewcontroller: Tabbarcontroller
leftdrawerviewcontroller: Leftdrawercontroller
rightdrawerviewcontroller:nil];
// gesture pull-out, pull-in
[self. Drawercontroller setopendrawergesturemodemask:mmopendrawergesturemodeall];
[self. Drawercontroller setclosedrawergesturemodemask:mmclosedrawergesturemodeall];
// Pull-out width
[self. Drawercontroller setmaximumleftdrawerwidth:350.0];
// give keywindow display
[uiapplication sharedapplication]. Keywindow. Rootviewcontroller = self. Drawercontroller;
2. Implement the navigation bar button in Homeviewcontroller click Open and Close.
1. Introduction of Frame Mmdrawercontroller
2 Acquisition of objects
< span class= "s2" > mmdrawercontroller * mmvc = (mmdrawercontroller *) [uiapplication sharedapplication]. Keywindow. Rootviewcontroller
< span class= "s2" > 3 method implementation //Right pull
[mmvc toggledrawerside:mmdrawersideleft animated:YES Completion: ^ (BOOL finished) {
}];
Mmdrawercontroller use in table view and navigation bar