【发布时间】:2012-08-12 08:35:36
【问题描述】:
我最近从 Storyboard 转换为 XIB。因为我有大量的视图,并且通过 git 存储库使用 XIB 更容易。 (该应用现在也可用于 iOS 4)。
现在这是我以前拥有的代码,但我想知道如果没有 Storyboard,但使用 XIB,我将如何实现相同的目标:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:[NSBundle bundleForClass:[self class]]];
infoView *infoViewController = [storyboard instantiateViewControllerWithIdentifier:[defaults objectForKey:@"launchScreen"]];
infoViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentViewController:infoViewController animated:YES completion:nil];
【问题讨论】:
标签: objective-c ios xcode storyboard xib