从故事板获取继承的视图控制器的视图

时间:2013-03-28 14:06:44

标签: iphone uiviewcontroller storyboard

我有两个课程:AViewController : UIViewControllerBViewController : AViewController

当我使用AViewController.xib时,我可以从一个常见的xib 创建实例BViewController

BViewController *bVC = [[BViewController alloc] initWithNibName:@"AViewController" bundle:nil];    
[self presentViewController:bVC animated:YES completion:NULL];

故事板可以实例化AViewController

AViewController *aVC = [self.storyboard instantiateViewControllerWithIdentifier:@"AViewController"];

如何使用标识符为“AViewController”的视图从Storyboard中实例化BViewController

0 个答案:

没有答案