如何将两个应用程序合并为一个应用程序(合并两个项目) [英] How to Combine Two Apps into One App (Combine two Projects)

查看:623
本文介绍了如何将两个应用程序合并为一个应用程序(合并两个项目)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个名为 A、B 的项目(两个应用),它们是单独创建的,现在我想把它变成一个应用,有可能吗?

I have two Projects(Two apps)named A,B which was created seperately,Now i want to make this into one app,Is it Possible?

示例在这个应用程序中,它应该以A(项目A中的视图控制器)作为视图启动,然后通过点击按钮或执行一些操作类似的事情,我必须转到 B(项目 B 中的视图控制器)作为视图并执行操作,然后我必须回到 A 的某些视图.想在两个项目中使用不同的视图,然后我想在两个项目类文件之间关联和传递数据.

Example In this app it should launch with A(viewcontroller in Project A) as view and do some actions then by button tap or something like that i have go to B(viewcontroller in Project B)as View and do actions then i have to back to some view of A.want to go different views in both the projects then i want to relate and pass data between two project class files.

注意:这两个项目都有 5 个故事板 &每个 100 个类文件. 两者都不是库.

我已经了解了工作空间的概念,但无法得到一个清晰的概念.

I have gone through with workspace concept but can't get a clear idea.

推荐答案

您可以使用 Xcode 工作区.

工作区是一个 Xcode 文档,它将项目和其他文档分组,以便您可以一起处理它们.一个工作区可以包含任意数量的 Xcode 项目,以及您想要包含的任何其他文件.除了组织每个 Xcode 项目中的所有文件之外,工作区还提供了包含的项目与其目标之间的隐式和显式关系.

A workspace is an Xcode document that groups projects and other documents so you can work on them together. A workspace can contain any number of Xcode projects, plus any other files you want to include. In addition to organizing all the files in each Xcode project, a workspace provides implicit and explicit relationships among the included projects and their targets.

在工作区中,他们共享一个构建目录.要创建一个,请转到文件 > 新建 > 工作区,然后选择其在文件系统中的位置.然后,将现有项目添加到工作区:

In the workspace, they share a build directory. To create one, go to File > New > Workspace, and select its location in your file system. Then, to add an existing project to a workspace:

  1. 在项目导航器中,按住 Control 键并单击下方的空白区域列表.
  2. 选择将文件添加到".
  3. 导航到包含要添加的 .xcodeproj 文件的文件夹.
  4. 选择 .xcodeproj 文件点击添加.

然后 AB 将在一个大项目中.

Then A and B will be in one big project.

希望这会有所帮助

这篇关于如何将两个应用程序合并为一个应用程序(合并两个项目)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆