xcode 如何将xib转换为故事板?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11785583/
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
How to convert xib to storyboard?
提问by Neru-J
I have downloaded Rotating Wheel Controlproject. It is a XCode project that uses xib and I would like it to use Storyboards. Is there a good way to move xib "Rotating Wheel Control" files into the Storyboard?
我已经下载了Rotating Wheel Control项目。这是一个使用 xib 的 XCode 项目,我希望它使用故事板。有没有一种好方法可以将xib“Rotating Wheel Control”文件移动到Storyboard中?
Does anyone have experience with move xib files into Storyboard?
有没有人有将 xib 文件移动到 Storyboard 的经验?
I try to do the best I can, but when I run the program I get a
NSInvalidArgumentException
.
我尽力做到最好,但是当我运行程序时,我得到了一个
NSInvalidArgumentException
.
Can anyone explain, How could I can fix this problem?
谁能解释一下,我怎么能解决这个问题?
采纳答案by Stephen Darlington
I think "no" is the short answer. I raised a Radar with Apple last year but they've not done anything yet!
我认为“不”是简短的回答。去年我与 Apple 建立了一个 Radar,但他们还没有做任何事情!
You can sometimes open the XIB and copy and paste the controls into your Storyboard, but the formatting is sometimes wrong and you still have to adjust the outlets and actions manually.
您有时可以打开 XIB 并将控件复制并粘贴到您的 Storyboard 中,但格式有时是错误的,您仍然需要手动调整插座和动作。
There is no reason why you can't use both Storyboards and XIBs in a single project; maybe that's the best approach in the short term.
没有理由不能在一个项目中同时使用 Storyboard 和 XIB;也许这是短期内最好的方法。