故事板导航
我有一个问题,我有我的第一个视图控制器,当我按下按钮与主机连接以检查用户是否已注册时..但是当我按下按钮时故事板会传递下一个视图并在检查用户后..所以
我正在尝试使用代码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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须将第一个视图与第二个视图连接起来并选择推送。连接第一个视图和第二个视图很重要,而不是按钮和第二个视图。
编辑:我再次阅读了你的问题。如果你改变它就会起作用。如果连接按钮和视图控制器,则将直接执行推送操作。
以下只是一个提示;o)
单击 segue,它链接到第二个视图。您必须为该 segue 指定一个名称,因此将标识符名称更改为“loginDone”之类的名称。 (打开右侧菜单;o))
现在您可以在检查登录表单后执行此操作:
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: