一款实现弹出侧边菜单效果
这是一款实现弹出侧边菜单效果,实现在弹出侧边菜单后,然后主视图会变小了,也就是后退的效果,而且还可以加上阴影的效果,喜欢的朋友可以下载学习一下看看吧。 说明说明: 添加侧边菜单: #import "MVYSideMenuController.h" - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Create your menu view controller MVYMenuViewController *menuVC = [[MVYMenuViewController alloc] initWithNibName:@"MVYMenuViewController" bundle:nil]; // Create your main content view controller MVYContentViewController *contentVC = [[MVYContentViewController alloc] initWithNibName:@"MVYContentViewController" bundle:nil]; // Initialize the MVYSideMenuController MVYSideMenuController *sideMenuController = [[MVYSideMenuController alloc] initWithMenuViewController:menuVC contentViewController:contentVC options:options]; // Add to the window self.window.rootViewController = sideMenuController; [self.window makeKeyAndVisible]; return YES; } 可以调整以下参数: MVYSideMenuOptions *options = [[MVYSideMenuOptions alloc] init]; options.menuViewOverlapWidth = 60.0f; options.bezelWidth = 15.0f; options.contentViewScale = 0.9f; // 1.0f to disable scale options.contentViewOpacity = 0.5f; // 0.0f to disable opacity options.panFromBezel = NO; options.panFromNavBar = YES; options.animationDuration = 0.3f; 打开菜单和关闭菜单: // Close menu animated [sideMenuController closeMenu]; // Open menu animated [sideMenuController openMenu];
- 1
- 粉丝: 3
- 资源: 922
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助