问题描述
我开始使用 xcode 中提供的 tabbar 应用模板创建一个应用.然后我想更改文件的名称:FirstViewController 应该变成 YellowViewControler,FirstView.xib 应该变成 YellowViewcontroller.xib.更改 xib 的名称不正确.它变成了红色,就好像它在项目中不存在一样.那么:我应该如何更改 xib 文件的名称?
I started to create an app using tabbar app template provided in xcode. Then I wanted to change the names of the files: FirstViewController should become YellowViewControler and FirstView.xib should become YellowViewcontroller.xib. Changing the name of the xib wasn't done right. It became red as if it didn't exist in the project. So: how should I change the name of the xib files?
推荐答案
使用Xcode的重构"工具.
Use the "Refactor" tool of Xcode.
这将管理 XIB 文件的重命名、界面的重命名以及包含 ViewController 定义的源文件的实现、类声明/定义的重命名以及在项目中任何地方使用的任何引用,所有这些都在一个操作中.
This will manage the renaming of the XIB file, the renaming of the interface & implementation of the source file containing the definition of the ViewController, the renaming of your class declarations/definitions, and any references that are used anywhere in your projects, all of this in one action.
这篇关于重命名xib文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!