0

我有两个班级:AViewController : UIViewControllerBViewController : AViewController

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

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

故事板可以实例化AViewController

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

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

4

0 回答 0