我知道这绝对是重复的,但对我没有任何帮助。现在这是一个非常简单的任务,是的,但我就是想不通。我要做的就是在按下按钮时打开一个新视图。当我点击按钮时它崩溃
视图控制器.m
- (IBAction)buttonTapped:(id)sender {
UIViewController *WebViewController = [[UIViewController alloc]initWithNibName:@"WebViewController" bundle:nil];
[self presentViewController:WebViewController animated:YES completion: nil];
}
错误
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x9829be0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key webView.'