zoukankan      html  css  js  c++  java
  • OC--初始化UINavigationController

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

    {

      // create a navigation controller and perform some simple styling

      self.navigationController = [UINavigationController new];

      self.navigationController.navigationBar.barTintColor = [UIColor darkGrayColor];

      [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];

      

      // create and navigate to a view controller

      UIViewController *viewController = [self createInitialViewController];

      [self.navigationController pushViewController:viewController animated:NO];

      // show the navigation controller

      self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

      self.window.rootViewController = self.navigationController;

      [self.window makeKeyAndVisible];

      return YES;

    }

    - (UIViewController *)createInitialViewController {

      self.viewModelServices = [[RWTViewModelServicesImpl alloc] initWithNavigationController:self.navigationController];

      self.viewModel = [[RWTFlickrSearchViewModel alloc]

                        initWithServices:self.viewModelServices];

      return [[RWTFlickrSearchViewController alloc]

              initWithViewModel:self.viewModel];

    }

  • 相关阅读:
    Alpha 冲刺 (7/10)
    Alpha 冲刺 (6/10)
    同学录
    Alpha 冲刺 (5/10)
    Letcode刷题总结知识点
    python 基础语法
    Python 文件读写与编码解读
    py2exe界面和程序开发打包
    求职者五险一金解读
    互联网企业程序题总结
  • 原文地址:https://www.cnblogs.com/SimonGao/p/4882192.html
Copyright © 2011-2022 走看看