我已经使用情节提要完成了一个单独的项目。

我需要与不使用情节提要的现有大型项目集成。

是否可以部分使用故事板(仅适用于某些视图控制器)?如果可以,怎么办?

最佳答案

当然。您可以从情节提要中实例化单独的视图控制器:

获取情节提要对象

+ storyboardWithName:bundle:


实例化Storyboard View控制器

– instantiateInitialViewController
– instantiateViewControllerWithIdentifier:


例如:

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Storyboard" bundle:nil];
YourViewController *yourVC = [storyboard instantiateViewControllerWithIdentifier:@"yourViewControllerIdentifier"];

08-15 20:33