Xcode 4 中的“读/写类文件”在哪里?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5372492/
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 20:35:10  来源:igfitidea点击:

Where is "Read/Write class files" in Xcode 4?

iphonexcodexcode4

提问by drewblaisdell

I cannot for the life of me find any information about where this moved to in Xcode 4. In Xcode 3.2, I would simply select my view/whichever object and go to File > Write Class Files... and it would save the classes for me.

我一生都找不到关于它在 Xcode 4 中移动到哪里的任何信息。在 Xcode 3.2 中,我只需选择我的视图/任何对象,然后转到 File > Write Class Files... 它将保存类我。

This is probably very simple to answer, but the documentation for Xcode 4 reveals nothing about this UI change.

这可能很容易回答,但 Xcode 4 的文档没有透露有关此 UI 更改的任何信息。

回答by Adam Eberbach

You just don't do it any more because of the way Xcode 4's integrated Interface Builder functions.

由于 Xcode 4 的集成 Interface Builder 功能的原因,您不再需要这样做了。

When you are looking at an Interface Builder view, try clicking the button that looks like a little tuxedo - a variant of Apple's annoying (to me, can't explain why) "assistant" icon. You will get a pane of the corresponding source file zooming in. Control-drag from your object to your source file - presto, IBOutlet or IBAction created!

当您查看 Interface Builder 视图时,请尝试单击看起来像小燕尾服的按钮 - Apple 烦人的(对我来说,无法解释原因)“助手”图标的变体。您将获得一个相应源文件的窗格放大。从您的对象按住 Control 拖动到您的源文件 - presto、IBOutlet 或 IBAction 创建!

If your IB files are out of sync with source, either go do the "write class files" step in Xcode 3 before switching to 4, or make all the connections again. There is just no need for "read class files" because the xib and source are intimately connected.

如果您的 IB 文件与源文件不同步,请在切换到 4 之前在 Xcode 3 中执行“编写类文件”步骤,或者再次建立所有连接。根本不需要“读取类文件”,因为 xib 和源代码紧密相连。

See page 65of the "XCode 4 Transition Guide" This document is worth reading in full even if you've been developing for years.

请参阅“ XCode 4 转换指南”的第 65 页,即使您已经开发多年,该文档也值得完整阅读。