gpt4 book ai didi

ios - Apple Watch Storyboard : Unsupported Configuration - Interface Controller is unreachable for a modal controller

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:40:38 25 4
gpt4 key购买 nike

我正在为我的 watch 应用开发用户界面。我有一个 Home Interface Controller,当推送通知到达时,应该会出现第二个 Modal Interface Controller。

我将两个界面 Controller 拖到 Storyboard上。通常,如果 Controller 上有按钮/表格单元格等,则可以通过从按钮拖动到模态 Controller 来创建模态转场。由于我的模态 Controller 不是通过与按钮交互呈现的,而是通过响应推送通知呈现的,因此我决定以编程方式呈现模态 Controller 。 (我似乎找不到在 Storyboard 中没有按钮的情况下创建模态转场的方法。直接从一个 Controller 拖到另一个 Controller 只给我提供了下一页转场的选项,但没有模态转场。)

但是,如果我在代码中执行此操作, Storyboard中将显示一条警告,指出我的模态 Controller 无法访问。从 Storyboard来看,模态 Controller 确实看起来是独立的和分离的,但我在代码中展示它。有没有办法让警告消失?

最佳答案

为了解决这个问题,您需要为特定的 View Controller 提供一个标识符。转到 Attribute Inspector,在 Identifier 字段中添加一个值。该值用于通过代码访问 View Controller ,因此它应该是唯一的。

enter image description here

关于ios - Apple Watch Storyboard : Unsupported Configuration - Interface Controller is unreachable for a modal controller,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30499506/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com