首页 > 解决方案 > 我可以在情节提要中使 ViewController 处于非活动状态吗?

问题描述

我为我的应用程序制作了一个 ViewController,结果证明这是我现在无法处理的工作。但是,我想为将来的版本保存工作。

我的问题是现在我收到警告:

".../Main.storyboard: warning: Unsupported Configuration: “Calendar“ is unreachable because it has no entry points, and no identifier for runtime access via -[UIStoryboard instantiateViewControllerWithIdentifier:]."

有没有办法在不彻底删除视图控制器的情况下让这个警告消失?我寻找一个属性来简单地停用/禁用 ViewController,但这似乎不可能。然后我可以欺骗 Xcode 认为它是可访问的,即使它不是?

标签: iosxcodestoryboardviewcontroller

解决方案


在视图控制器 -> 身份检查器 -> 身份中为“故事板 ID”添加任何文本值似乎可以解决问题。

(感谢在现已删除的评论中提出该建议的人;由于某种原因,它起初没有用,但现在可以了)


推荐阅读