一款实现弹出侧边菜单效果

应用介绍

    这是一款实现弹出侧边菜单效果,实现在弹出侧边菜单后,然后主视图会变小了,也就是后退的效果,而且还可以加上阴影的效果,喜欢的朋友可以下载学习一下看看吧。 说明说明: 添加侧边菜单: #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];

    点赞(0)

    立即下载

    请到会员中心签到两次后即可获得免费下载!

    注释列表 共有 0 条评论

    暂无评论
    0
    立即
    投稿
    发表
    评论
    返回
    顶部