笔记:载入viewcontroller的几种方式
程序员文章站
2022-11-26 20:39:49
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; UIViewController *vc = [storyboard instantiateViewControlle... ......
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];
上一篇: PGA