触摸/未触摸在 xcode 中做什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1832561/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 18:59:15  来源:igfitidea点击:

What does the touch/untouch do in xcode?

iphonexcode

提问by Rahul Vyas

In XCode, if one right-clicks on a class file or a .xib file, there are two menu items: "Touch" and "Untouch".

在 XCode 中,如果在 class 文件或 .xib 文件上单击鼠标右键,则会出现两个菜单项:“Touch”和“Untouch”。

What do they do?

他们在做什么?

回答by luvieere

If a file is touched, it will be rebuilt the next time you build a target to which it belongs.

如果一个文件被触及,它会在你下次构建它所属的目标时被重建。

Thus, touch marks a file as being modified (and thus needing to be compiled) - easier than opening the file, adding a space, deleting the space, and then saving it.

因此,touch 将文件标记为被修改(因此需要编译)——比打开文件、添加空间、删除空间然后保存更容易。

Untouch does the opposite - marks the file as not needed to be compiled (usually a bad thing to do since the build can get out of sync with the sources, but if all you did was edit the date in a comment in a header file included by everything it allows you to avoid a full rebuild).

Untouch 做相反的事情 - 将文件标记为不需要编译(通常是一件坏事,因为构建可能与源不同步,但如果您所做的只是在包含的头文件中的注释中编辑日期通过它可以让您避免完全重建的一切)。