故事板导航

发布于 2024-12-21 08:05:30 字数 312 浏览 4 评论 0原文

我有一个问题,我有我的第一个视图控制器,当我按下按钮与主机连接以检查用户是否已注册时..但是当我按下按钮时故事板会传递下一个视图并在检查用户后..所以

我正在尝试使用代码pushViewController,但我不知道如何推送故事板内的视图。

这是代码: http://pastie.org/3025806

在此处输入图像描述

I have one problem, I have my first view controller and when i push a button to connect with my host to check if the user is registered.. but when i push the button the storyboard pass the next view and after check the user...

So i'm trying pushViewController with code, but i dont know how push a view that is inside the storyboard.

Here is the code : http://pastie.org/3025806

enter image description here

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

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

发布评论

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

评论(1

慕巷 2024-12-28 08:05:30

您必须将第一个视图与第二个视图连接起来并选择推送。连接第一个视图和第二个视图很重要,而不是按钮和第二个视图。


编辑:我再次阅读了你的问题。如果你改变它就会起作用。如果连接按钮和视图控制器,则将直接执行推送操作。

以下只是一个提示;o)


单击 segue,它链接到第二个视图。您必须为该 segue 指定一个名称,因此将标识符名称更改为“loginDone”之类的名称。 (打开右侧菜单;o))

现在您可以在检查登录表单后执行此操作:

[self performSegueWithIdentifier:@"loginDone" sender:self];

You have to connect the first view with the second view and choose push. It's important to connect the first view and the second view, NOT the Button and the second view.


Edit: I've read your question again. If you change that it will work. If you connect the button and the view controller the push action will be executed directly.

The following is just a tip ;o)


Click on segue, which links to the second view. You have to give a name to that segue so change the identifier name to something like "loginDone". (Open the right menu for that ;o))

Now you can do this after you checked your login form:

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