Programming iOS: clarifications about Root View Controller

后端 未结 4 689
生来不讨喜
生来不讨喜 2020-12-15 11:20

Through this question I would like to know if I understand well the notion of Root View Controller.

In iOS application, the Root View Controller (RVC) is the control

4条回答
  •  臣服心动
    2020-12-15 11:57

     -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
     {
        self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    
    // Override point for customization after application launch.
       self.window.backgroundColor = [UIColor whiteColor];
    
       ViewController *viewcontroller =[[ViewController alloc]initWithNibName:@"ViewController" bundle:nil];
    
    self.window.rootViewController= viewcontroller;
    
    
    
    
     [self.window makeKeyAndVisible];
     return YES;
    

    }

提交回复
热议问题