笔记:载入viewcontroller的几种方式

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"IDENTIFIER"];
[self.navigationController pushViewController:vc animated:YES];


UIViewController *vc = [[UIViewController alloc] initWithNibName:@"NIBNAME" bundle:nil];
[self.navigationController pushViewController:vc animated:YES];

UIViewController *vc = [[UIViewController alloc] init]; [self.navigationController pushViewController:vc animated:YES];
 

 

posted @ 2019-04-11 14:53  纯粹的code  阅读(317)  评论(0编辑  收藏  举报