最近在学习IOS 相关的开发 ,然后想做一下多个 storyboard 的跳转 ,网上 查到的一些 需要设置 storyboard 的 id。然后通过id 实例化 但是我这边实验了一下。总是报错说是找不到 id ,后面我通过 name 获取 跳转是成功的 这里我记录一下。然后关于id 的方式 如果有小伙伴知道什么原因也可以 评论留言
UIStoryboard *table = [UIStoryboard storyboardWithName:@"storyboard的名字" bundle:nil];
//加载 对应的viewcontroller
UIViewController *controler = table.instantiateInitialViewController;
[self.navigationController pushViewController:controler animated:YES];