【发布时间】:2015-10-07 09:12:00
【问题描述】:
我正在做一个简单的登录设置,其中检查了用户名和密码,如果是真的,我将它们引导到新页面。但是我得到了这个错误......请向我解释一下这种错误是什么意思。
以下是我的 ViewController.m 中的函数
- (IBAction)login:(id)sender
{
NSString *username = [_userName text];
NSString *pass = [_password text];
if ([username isEqualToString:@"admin"] && [pass isEqualToString:@"password"] ) {
MiddleViewController *middle = [[MiddleViewController alloc] init];
[self presentedViewController:middle animated:YES completion:nil];
}
}
MiddleViewController 是故事板上的子类 UIViewController。 然后,当我在字段中按下带有管理员和密码的按钮时,模拟器就会变暗。
【问题讨论】:
-
请检查 Xcode 是否引用了正确的 info.plist 文件。检查目标的构建设置。
-
您需要正确导航吗?
标签: ios iphone xcode emulation