这个警报无论如何解决不了:
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的图片:
谢谢