啊啊!!!我把界面生成器丢给了代码
所以这可能是一个菜鸟问题,但我的界面生成器变成了红色代码。我认为“版本编辑器”以某种方式做到了,但我只是想要它回来。我是菜鸟,不会用代码编写界面。有什么帮助吗?
So this is probably a noob question, but my interface builder turned into red code. I think the "version editor" somehow did it, but I just want it back. I am a noob and can't write the interface in code. Any help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的意思是在列出文件的左侧窗格中,.xib 文件名变成红色?这意味着该文件已经消失,并且通常 XCode 不会执行此操作,否则它也会将其从列表中删除。也许您从文件系统中删除了它,也许它是由版本控制系统完成的,正如您所建议的。如果您将其保存在版本控制系统中,您应该能够恢复它的最新版本。
如果所有其他方法都失败,请选择“文件”>“新的>新文件。选择iOS下的用户界面,然后选择通常的视图。使用 Interface Builder 从头开始重新创建界面。
You mean in the left pane that lists your files, the .xib filename turned red? That means the file is gone, and usually XCode didn't do it, or it would have removed it from the list too. Maybe you deleted it from the file system, maybe it was done by a version control system as you are suggesting. If you have it in a version control system you should be able to get back the last version of it.
If all else fails, File > New > New File. Choose User Interface under iOS, and pick usually View. Re-create your interface using Interface Builder from scratch.