这个警报无论如何解决不了:
Attempt to present <LoginViewController: 0x1f0b5010> on <ViewController: 0x1dda1670> whose view is not in the window hierarchy!
没有在storyboard中segue。调用模式视图:
//Load Login View if no username is found
NSLog(@"No username found");
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
LoginViewController *loginView = (LoginViewController *)
[storyboard instantiateViewControllerWithIdentifier:@"LoginViewController"];
[self presentViewController:loginView animated:YES completion:nil];
storyboard的图片:
谢谢
你填错了,看下你帐号密码对不对!
你这段代码是放在什么位置的? Appdelgate.m 文件中?