如何在自定义的ViewController加载Storyboard里面的ViewController

如何在自定义的ViewController加载Storyboard里面的ViewController_第1张图片


    //取出stroryboard里面的控制器:
    UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    //将取出的storyboard里面的控制器被所需的控制器指着。
    JChartViewController *jVC = [mainStoryboard instantiateViewControllerWithIdentifier:@"JChartViewController"];

  OK啦~



你可能感兴趣的:(viewcontroller,storyboard)