当前位置: 首页 > 工具软件 > RESideMenu > 使用案例 >

侧滑RESideMenu的使用

丁学
2023-12-01
MainTabBarViewController *mainCtrl = [[MainTabBarViewController alloc] init];
LeftViewController *leftMenuViewController = [[LeftViewController alloc] init];
//DEMORightMenuViewController *rightMenuViewController = [[DEMORightMenuViewController alloc] init];

// Create side menu controller
//


RESideMenu *sideMenuViewController = [[RESideMenu alloc] initWithContentViewController:mainCtrl
                                                                leftMenuViewController:leftMenuViewController
                                                               rightMenuViewController:nil];
sideMenuViewController.backgroundImage = [UIImage imageNamed:@"Stars"];
sideMenuViewController.scaleMenuView = NO;
sideMenuViewController.panGestureEnabled = YES;
sideMenuViewController.panFromEdge = NO;

sideMenuViewController.scaleContentView = NO;


mainCtrl.sideMenuViewController = sideMenuViewController;
// Make it a root controller
//
self.window.rootViewController = sideMenuViewController;

github: https://github.com/romaonthego/RESideMenu

 类似资料: