简体   繁体   English

如何完全改变Xcode项目?

[英]How to change Xcode project entirely?

I have an xcode project boilerplate codebase that I am using for my third project. 我有一个xcode项目样板代码库,我用于我的第三个项目。

It has class prefixes from the last project and also the name of the previous project everywhere. 它具有来自上一个项目的类前缀以及前一个项目的名称。 plist, pch, project name, schemes, build targets, folders etc. plist,pch,项目名称,方案,构建目标,文件夹等。

Also the copyright text in the classes need to be changed to the new one for the new client. 此外,还需要将类中的版权文本更改为新客户端的新版本。

Is there a consolidated way to change all the identity from my previous project to the new one rather than doing it one by one? 是否有一种统一的方法可以将我之前项目中的所有身份更改为新项目,而不是逐个进行?

You can use Xcode's refactoring tools to rename classes and other identifiers wherever they occur, but you still have to do each identifier individually -- you can't change all the classes at the same time. 您可以使用Xcode的重构工具在任何地方重命名类和其他标识符,但您仍然必须单独执行每个标识符 - 您不能同时更改所有类。 Find and replace should take care of things like copyright text. 查找和替换应该处理版权文本之类的事情。

The Edit->Refactor->Rename... command (or control-click on a name to get to the Refactor context menu) is the best way to rename things like classes and variables because it will catch cases you might not have thought of. 编辑 - >重构 - >重命名...命令(或控制点击名称以进入重构上下文菜单)是重命名类和变量之类的最佳方法,因为它将捕获您可能没有想到的情况。 For example, renaming a class will change the name in storyboard and .xib files. 例如,重命名类将更改storyboard和.xib文件中的名称。

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

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