在iOS中使用Objective-C推送segue的模式

时间:2015-03-24 14:08:40

标签: ios objective-c iphone

我正在尝试创建app.It从profileViewController开始,如果用户没有登录,我有一个segue,它是modal.I&#39; m显示LoginViewController.I在loginViewController中有一个注册按钮。如果用户点击那个按钮我有一个segue,它需要按下SignUpViewController。但是我犯了错误Presenting view controllers on detached view controllers is discouraged <ProfileViewController:

Test[1875:468590] Unbalanced calls to begin/end appearance transitions for <UITabBarController:

    [LoginViewController signUp:]: unrecognized selector sent to instance
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[LoginViewController signUp:]: unrecognized selector sent to instance
我应该怎么做 感谢

1 个答案:

答案 0 :(得分:0)

您应该以模态方式呈现UINavigationController。这个导航控制器的RootViewController将是LoginViewController。然后只需按下SignUpViewController。