如何复制 .xib 文件?
当我右键单击 .xib 时,我发现没有“重复”。那么这样做的方法是:只是去finder,将文件复制到另一个名称,然后将其拖到我的资源中?这就是我需要做的全部吗?
[注意:只是想知道是否还有其他文件或设置需要处理。]
I see there's no "duplicate" when I right click on a .xib. So is the way to do it: just to go to finder, copy the file to another name, and then drag it to my resources? Would that be all I'd need to do?
[Note: just wondering if there's other files or settings I need to bother with.]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
最好的方法是在 xib 或 Storyboard 上使用 cmd ⌘ ,shift, s 。然后使用新名称或位置保存它。
The best way to do this is use cmd ⌘ ,shift, s on the xib or storyboard. Then save it with a new name or location.
是的,这就是我们所需要的大部分内容。确保打开 nib 文件并验证连接是否符合您的要求。它的行为就像您复制的任何文件一样。只需给它一个原始名称,并确保在将其导入项目之前将其保存在正确的文件夹中。
Yes, that's most of what's needed. Make sure to open the nib file and verify that the connections are as you want them to be. It will act like any file you duplicate. Just give it an original name and make sure it's saved in the correct folder before you import it into the project.
是的,您可以通过(命令+c)复制 xib 文件的内容,并使用(命令+v)将其粘贴到另一个 xib 文件中,但只需复制并粘贴,您将无法获得所需的引用在 xib 文件中的属性中,您需要提供为其创建新 xib 文件的类名,然后它将为您提供引用。
yes , you can copy the the contents of the xib file by just (command+c) and paste it into another xib file by using (command +v) but by simply cop and pasting you won't get the references you need to go the properties in xib file there you need to give the class name for which you have created a new xib file and then it will give you the references.