简体   繁体   English

Cocoapods与情节提要场景

[英]Cocoapods with Storyboard Scene

I am working in two apps, in which one of the ViewController does the same purpose in two apps(Like Help/about page). 我在两个应用程序中工作,其中一个ViewController在两个应用程序中具有相同的目的(如“帮助/关于”页面)。 These two projects uses storyboard and uses two view controllers. 这两个项目使用情节提要和两个视图控制器。 Now, I am planning to integrate Cocoapods for my projects, so that I can reuse the same class/ViewController. 现在,我计划为我的项目集成Cocoapods,以便可以重用相同的类/ ViewController。 My question is "Is there a way to reuse this ViewController in two or more different projects using Cocoapods without breaking/modifying a storyboard ?" 我的问题是“有没有一种方法可以在不破坏/修改情节提要的情况下,使用Cocoapods在两个或多个不同的项目中重用此ViewController?” If yes, how to do that? 如果是,该怎么做? If not possible, how can I reuse the same view with two different apps? 如果不可能,如何在两个不同的应用程序中重复使用同一视图?

If I understood your question correctly, I had the same issue a few weeks ago. 如果我正确理解了您的问题,那么几周前我也遇到了同样的问题。

RBStoryboardLink was the solution: https://github.com/rob-brown/RBStoryboardLink 解决方案是RBStoryboardLink: https : //github.com/rob-brown/RBStoryboardLink

This library lets you connect Storyboards and works fine with projects from cocoapod. 该库使您可以连接情节提要,并与cocoapod中的项目配合使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM