有没有办法在同一个工作空间中实例化另一个项目的 Storyboard? 通过使用不同的 Storyboard名称并指向其包。
最佳答案
当然,您可以在同一工作区中从另一个项目打开一个项目的 Storyboard。
比如说,您在框架中有一个 Storyboard,并且想在您的应用程序中使用它。以下是您将如何从您的应用程序代码中做到这一点,
let frameworkBundle = NSBundle(identifier: "com.yourdomain.nameOfFramework") //getting the bundle for the framework
let storyboardFramework = UIStoryboard(name: "SM_Main", bundle: frameworkBundle) //pulling the storyboard from the framework
关于ios - 在工作区中打开另一个项目的 Storyboard,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39221171/