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];

    }

  • 相关阅读:
    jQuery插件之artDialog
    jQuery插件之ajaxFileUpload
    jQuery插件之Cookie
    jQuery插件之Form
    jQuery与DOM对象的转换
    jQuery之AJAX
    jQuery之元素筛选
    jQuery之位置
    POJ2096 概率dp 入门
    Sichuan State Programming Contest 2012 C。Counting Pair
  • 原文地址:https://www.cnblogs.com/SimonGao/p/4882192.html
Copyright © 2011-2022 走看看