最近在做framework的时候碰到storyboard切换问题这边复习下
oc
//设置bundle的这句代码可以不要 如果不是封装framework是不需要的直接设置成nil就可以了
// NSBundle *mainBundler = [NSBundle bundleForClass:[self class]];
//bundle设置成nil
UIStoryboard *stroyboard = [UIStoryboard storyboardWithName:@"TestStoryboard" bundle:nil];
//这边要加ID 即在storyboard的属性里面设置storyboard的ID
StoryboardTestViewController *vc = [stroyboard instantiateViewControllerWithIdentifier:@"test"];
swift 版本
let storyboard = UIStoryboard(name: "Main",bundle: nil)
let view2 = storyboard.instantiateViewControllerWithIdentifier("webView") as! WebViewController
//下面就可以接跳转了