xcode 在情节提要中将项目从一个视图复制并粘贴到另一个视图而不引用插座?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22533005/
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
Copy & Paste items from one view to another within storyboard without referencing outlets?
提问by LpLrich
When I copy and paste, (cmd-c, cmd-v) items from one view to another in Storyboard it also copies and pastes the items referencing outlets.
当我在 Storyboard 中将 (cmd-c, cmd-v) 项目从一个视图复制并粘贴到另一个视图时,它还会复制和粘贴引用插座的项目。
Obviously, it's achievable by going in and deleting the referencing outlets one by one. Which is what I want to avoid.
显然,可以通过一一进入并删除引用的出口来实现。这是我想要避免的。
I'm looking for something akin to (dare I say it) Excel's 'paste special' command.
我正在寻找类似于(我敢说)Excel 的“特殊粘贴”命令的东西。
UPDATE
更新
Nope, doesn't work in xcode 5.1 either, see image below, hopefully it succinctly shows you what is going on.
不,在 xcode 5.1 中也不起作用,请参见下图,希望它能够简洁地向您展示正在发生的事情。
The image shows a view at the top, Add Expense View Controller, another view at the bottom, the name's beside the point, I've copied my cells from Add Expense View Controller, lo & behold it's got the old references in there. You can also see I'm using xcode 5.1...
图像显示顶部的视图,添加费用视图控制器,底部的另一个视图,名称不在重点,我已经从添加费用视图控制器复制了我的单元格,瞧,那里有旧的引用。您还可以看到我正在使用 xcode 5.1 ...
So - how do you, or is it simply not possible, copy and paste without these references?
那么 - 你如何,或者根本不可能,在没有这些参考的情况下复制和粘贴?
Interestingly there is a paste special option in the Edit menu, but in Xcode's menu definitions in the documentation there is no definition for "Paste Special"...
有趣的是,编辑菜单中有一个特殊粘贴选项,但在文档中 Xcode 的菜单定义中,没有“特殊粘贴”的定义...
回答by Desdenova
Seems like they fixed it on Xcode 5.1
. Both copy/paste and option+drag doesn't copy the referencing outlets.
好像他们把它修好了Xcode 5.1
。复制/粘贴和选项+拖动都不会复制引用的出口。