找window找VC 找storybord

1.找window *****UIWindow *window = [UIApplication sharedApplication].delegate.window;

2.找storyboard *****UIStoryboard *storyBord = [UIStoryboard storyboardWithName:@"Main" bundle:nil];

3.貌似用于只有一个vc?或者找初始vc *****UIViewController *VC = storyBord.instantiateInitialViewController;

4.通过识别符,在storybord中找vc *****UIViewController *vc2 = [storyBord instantiateViewControllerWithIdentifier:@"xxx"];

window.rootViewController = VC;

你可能感兴趣的:(找window找VC 找storybord)