我想知道当前加载的 Storyboard是什么,我使用了下面的代码,但它仍然让我得到主 Storyboard而不是当前 Storyboard。
//This get me the Main storyboard
[[NSBundle mainBundle].infoDictionary objectForKey:@"UIMainStoryboardFile"];
最佳答案
基于 Durican 上面的回答:
在 View Controller 中:
UIStoryboard * storyboard = self.storyboard;
NSString * storyboardName = [storyboard valueForKey:@"name"];
(名称将不包含“.storyboard”文件扩展名。)
关于iphone - 如何知道当前 Storyboard名称?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17723732/