zoukankan      html  css  js  c++  java
  • iOS 程序初始一个带导航栏的视图

    @synthesize window = _window;
    @synthesize rootViewController = _rootViewController;
    
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
        
        _rootViewController = [[ViewController alloc] init];
        
        UINavigationController *rootNaviController = [[UINavigationController alloc] initWithRootViewController:_rootViewController];
    
        self.window.rootViewController = rootNaviController;
        [self.window makeKeyAndVisible];
    
        return YES;
    }

    在上述情况下的跳转:

    UINavigationController *nav = (UINavigationController*)self.window.rootViewController;
                [nav pushViewController:controller animated:YES];
    
  • 相关阅读:
    php 全局变量 2
    PHP 全局变量 1
    巧用sublime
    ini_get和ini_set
    sublime安装sftp
    常用数组函数
    二维数组去重
    判断常量
    system(),exec() ,passthru()
    【收集】Python 微优化
  • 原文地址:https://www.cnblogs.com/SimonGao/p/5008267.html
Copyright © 2011-2022 走看看