My Question is simple.
I am using say 5 different storyboards
along with 5 different core data models
. Now in the app delegate I want to know which storyboard is loaded in memory so that I can set the models accordingly.
I am setting the storyboard under the deployment info in the project settings.
尝试appDelegate.window.rootViewController.storyboard。
Try these lines of code...
NSString *mainStoryboard = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIMainStoryboardFile"];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:mainStoryboard bundle:nil];
Do they help?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.