我听说在XCode 4.5中有些变化,Storyboard的标识符不再称为identifier而是Storyboard ID。我试着使用它,但它没有进行任何初始化,总是空白的。我做错了什么?
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Storyboard" bundle:nil];
HistoryViewController* historyVC = [storyboard instantiateViewControllerWithIdentifier:@"histSB"];
随着
[self presentViewController:historyVC animated:YES completion:nil];
或者
[self.navigationController pushViewController:historyVC animated:YES];
或者
[self presentModalViewController:historyVC animated:YES];
请看Storyboard中的设置截图:
self.storyboard
,我经常使用它而没有问题。如果这也不起作用,那么可能与您的VC实现有关。 - ilmiacs