纯代码编写的vc跳转SB

今天遇到个问题,我整个项目都是纯代码,突然有个引用的VC用了storyboard,导航的跳转不知道如何操作,最后试了很多方法总算可以了

首先,找到要跳转的sb。

UIStoryboard *story = [UIStoryboard storyboardWithName:@"sb的名字" bundle:[NSBundle mainBundle]];

然后,通过sbId初始化对象。

AnFangDetailVC *vc = [story instantiateViewControllerWithIdentifier:@"StoryboardID"];

最后,push跳转。

原文地址:https://www.cnblogs.com/jiang-xiao-yan/p/9269394.html