iOS 键盘带有“加入”,转到另一个视图

发布于 2025-01-04 23:32:38 字数 351 浏览 0 评论 0原文

我希望加入键盘按钮使用以下代码切换到另一个视图:

PurseTab *CustomViewControllerScreen =
    [self.storyboard instantiateViewControllerWithIdentifier:@"Detail"];
[self.navigationController pushViewController:CustomViewControllerScreen
                                     animated:YES];

如果我单击按钮,则不会发生任何事情。

PS我正在使用故事板。

I want the Join keyboard button to switch to another view with the following code:

PurseTab *CustomViewControllerScreen =
    [self.storyboard instantiateViewControllerWithIdentifier:@"Detail"];
[self.navigationController pushViewController:CustomViewControllerScreen
                                     animated:YES];

If i click on button nothing happens.

P.S. I'm using Storyboard.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

撕心裂肺的伤痛 2025-01-11 23:32:38

如果错误显示 Storyboard () 不包含具有标识符“Detail”的视图控制器,则 Storyboard 很可能不包含具有标识符 Detail 的视图控制器代码>.您可能认为您在故事板中将视图控制器的标识符设置为 Detail,但也许您确实没有这样做,或者您正在测试旧版本的应用程序。

您需要确保属性检查器的视图控制器部分中的标识符字段显示 Detail,大小写正确且没有多余的空格。

虽然...如果错误消息确实显示 Storyboard () 那么这也很可疑。它应该显示类似于 Storyboard () 的内容。

If the error says Storyboard () doesn't contain a view controller with identifier 'Detail', then it's pretty likely that the storyboard doesn't contain a view controller with the identifier Detail. You may think you set the view controller's identifier to Detail in the storyboard, but perhaps you really didn't, or you are testing an old version of the app.

You need to make sure that the Identifier field in the View Controller section of the Attributes Inspector says Detail, with correct capitalization and no extra whitespace.

Although... if the error message really says Storyboard () then that's pretty suspicious too. It should say something like Storyboard (<UIStoryboard: 0xb65e570>).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文