ios开发怎么加载storyboard
1个回答
展开全部
//获取storyboard: 通过bundle根据storyboard的名字来获取我们的storyboard,
UIStoryboard *story = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
//由storyboard根据myView的storyBoardID来获取我们要切换的视图
UIViewController *myView = [story instantiateViewControllerWithIdentifier:@"myView"];
//由navigationController推向我们要推向的view
[self.navigationController pushViewController:myView animated:YES];
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询