xcode 故事板不会接受更改
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10998834/
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
xcode storyboard won't accept changes
提问by Rob Smythe
My storyboard seems locked. I have added new labels and imageviews to two different scenes, but at runtime the labels and pictures don't show. (All original items are displayed correctly.) I have tried Clean, Build, and Building for Running, Testing, and Profiling. I have copied the entire project to another Mac. It runs the program, accepts changes in the code, but this Mac, too, will not allow changes in the storyboard. (No added items, no changing the position of original items.) It's as if the storyboard is locked for editing.
我的故事板似乎被锁定了。我在两个不同的场景中添加了新标签和图像视图,但在运行时标签和图片不显示。(所有原始项目都正确显示。)我尝试过 Clean、Build 和 Building for Running、Testing 和 Profiling。我已将整个项目复制到另一台 Mac。它运行程序,接受代码更改,但此 Mac 也不允许更改故事板。(不添加项目,不改变原始项目的位置。)就像故事板被锁定以进行编辑。
I've searched for info on storyboard locking but can't find anything that seems to apply to me (i.e. I'm not one of a team working on the same program.)
我搜索了有关故事板锁定的信息,但找不到任何似乎适用于我的信息(即,我不是在同一程序上工作的团队中的一员。)
I'd appreciate any ideas.
我很感激任何想法。
(Xcode 4.2 on the 2nd Mac, Xcode 4.3.2 on the original where the problem first arose.)
(第二台 Mac 上的 Xcode 4.2,第一次出现问题的原始 Mac 上的 Xcode 4.3.2。)
回答by agarcian
I had the same issue, and realized that I was playing with the Localization Lockingsetting, which is located on the right hand side menu under Interface Builder Documents.
我遇到了同样的问题,并意识到我正在使用Localization Locking设置,它位于Interface Builder Documents下的右侧菜单上。
Make sure that the selected setting is Nothing
if you want to be able to make changes to your storyboard.
Nothing
如果您希望能够对故事板进行更改,请确保选择的设置。
Hope this helps.
希望这可以帮助。
回答by gunblues
I had the same issue in xocde6 and I got the answer on apple developer site
我在 xocde6 中遇到了同样的问题,我在苹果开发者网站上得到了答案
In project navigator, select a .storyboard or .xib file.
Choose a locking level from the Editor > Localization Locking menu. Refer to Locking levels for a description of the locking choices in this menu.
在项目导航器中,选择 .storyboard 或 .xib 文件。
从编辑器 > 本地化锁定菜单中选择锁定级别。有关此菜单中锁定选项的说明,请参阅锁定级别。
To unlock all the views in the file, choose Reset Locking Controls.
要解锁文件中的所有视图,请选择“重置锁定控件”。
For example, to prevent any edits to the nib file that would impact localized strings files, choose Reset Locking Controls followed by Localizable Properties.
例如,要防止对 nib 文件进行任何会影响本地化字符串文件的编辑,请选择“重置锁定控件”,然后选择“可本地化属性”。
回答by Umair Khalid
The solution worked for me was after selecting locked view go to
对我有用的解决方案是在选择锁定视图后转到
Editor > Localization Locking > Reset Locking controls
编辑器 > 本地化锁定 > 重置锁定控件
And it will reset
它会重置
回答by user462990
I found the Launch Screen Storyboard had an outlet and I had deleted the view controller that serviced it.
我发现 Launch Screen Storyboard 有一个插座,我删除了为其提供服务的视图控制器。
回答by sbjluke
The way I solved my issue:
我解决问题的方式:
My storyboard Target Membershipsomehow got unchecked.
我的故事板Target Membership不知何故没有被检查。
You'll find the Target Membership options in the same menu as the accepted answer, which is the File Inspector (first option) on the right sidemenu when you have your storyboard selected in Xcode
您将在与接受的答案相同的菜单中找到 Target Membership 选项,当您在 Xcode 中选择故事板时,这是右侧菜单中的文件检查器(第一个选项)