【发布时间】:2015-03-20 23:00:57
【问题描述】:
我正在使用 Swift 构建 iOS 应用程序,并被建议为每个功能使用故事板,因为每个功能将有大约 10 个视图。从主情节提要开始,任何人都可以提供有关如何使用 Swift 在情节提要之间转换的建议吗?或者,如果我想避免 50+ 视图主故事板的混淆,还有什么比使用多个故事板更好的办法吗?
这是最终的工作:
let secondVC:UIViewController = UIStoryboard(name: "SecondStoryboard", bundle:nil).instantiateViewControllerWithIdentifier("numberTwo") as UIViewController
@IBAction func changeStoryBoardButtonClicked(sender: AnyObject) {
presentViewController(secondVC, animated: false, completion: nil)
}
【问题讨论】:
标签: ios swift xcode-storyboard