首页 > 移动平台 > 详细

ios开发-载入viewcontroller的几种方式

时间:2015-01-13 11:57:23      阅读:320      评论:0      收藏:0      [点我收藏+]

1.故事版

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

2.xib

UIViewController *vc = [[UIViewController alloc] initWithNibName:@"NIBNAME" bundle:nil];

[self.navigationController pushViewController:vc animated:YES];

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

ios开发-载入viewcontroller的几种方式

原文:http://www.cnblogs.com/jwblogmj/p/4220581.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!