首页 > 代码库 > UIStoryboard
UIStoryboard
Getting a Storyboard Object
+ storyboardWithName:bundle: //获得特定的storyBorad
Instantiating Storyboard View Controllers
– instantiateInitialViewController //返回初始化场景的controller
– instantiateViewControllerWithIdentifier: //返回指定的controller
1.举例说明
//取得UIStoryboard对象
UIStoryboard *storyboard=self.storyboard;//获取当前的storyboard对象
//实例化
PushDetailViewController *push=[storyboard instantiateViewControllerWithIdentifier:@"PushDetailViewController"];
//赋值
push.GUID=[dic objectForKey:@"GUID"];
//push实例化的对象
[self.navigatorController pushViewController:push animated:YES];
UIStoryboard *storyboard=self.storyboard;//获取当前的storyboard对象
//实例化
PushDetailViewController *push=[storyboard instantiateViewControllerWithIdentifier:@"PushDetailViewController"];
//赋值
push.GUID=[dic objectForKey:@"GUID"];
//push实例化的对象
[self.navigatorController pushViewController:push animated:YES];
2.注意事项
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。