我有一个 UINavigationController 将 View Controller 下推 3 级。我正在尝试从第三个 UIViewController 访问 Storyboard,但我不能。是否有一种全局方式可以让我从任何 UIViewController 访问 Storyboard?
最佳答案
您应该能够通过任何 View Controller 的 storyboard
属性访问当前 Storyboard。例如:
self.storyboard;
编辑
如果由于某种原因未设置self.storyboard
,您始终可以通过调用获取 Storyboard
+ (UIStoryboard *)storyboardWithName:(NSString *)name bundle:(NSBundle *)storyboardBundleOrNil
关于iphone - 从 UIViewController 访问 Storyboard,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11213307/