码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2015-01-13 11:57:42      阅读:139      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!