zoukankan      html  css  js  c++  java
  • 侧边栏效果

    appDelegate

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
        
        // 侧滑菜单效果
        MRMenu *menu = [[MRMenu alloc] init];
        MRContentViewController *contentVC = [[MRContentViewController alloc] init];
        MRContentNavigationController *contentNavigationController = [[MRContentNavigationController alloc] initWithRootViewController:contentVC];
        
        MVYSideMenuOptions *options = [[MVYSideMenuOptions alloc] init];
        MVYSideMenuController *sideMenuController = [[MVYSideMenuController alloc] initWithMenuViewController:menu contentViewController:contentNavigationController options:options];
        sideMenuController.view.backgroundColor = [UIColor whiteColor];
        // 设置菜单控制器为窗口的跟控制器
        self.window.rootViewController = sideMenuController;
        
        // 设置窗口为主窗口
        [self.window makeKeyAndVisible];
        
        return YES;
    }

    需要使用一下第三方框架:MVYSideMenu

     

  • 相关阅读:
    linux初学者-ftp篇(一)
    随机密码生成
    倒计时问题java
    百钱买鸡
    去7JAVA
    贪吃蛇Controller Java实现(二)
    贪吃蛇Global Java实现(二)
    贪吃蛇GamePanel Java实现(二)
    贪吃蛇Listener Java实现(二)
    贪吃蛇snake Java实现(二)
  • 原文地址:https://www.cnblogs.com/yuanjunliang/p/4745719.html
Copyright © 2011-2022 走看看