我正在尝试制作一个应用程序。它从profileViewController开始,如果用户没有登录,我有一个segue,它是模态的。我正在显示LoginViewController。我在LoginViewControl中有一个注册按钮。如果用户点击该按钮,我有一个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
我该怎么办感谢
您应该以模式呈现UINavigationController。此导航控制器的RootViewController将是LoginViewController。然后只需按下SignUpViewController。