开发者

Modalviewcontroller problem [duplicate]

开发者 https://www.devze.com 2023-03-14 20:53 出处:网络
This question already has answers here: Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error?
This question already has answers here: Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error? (79 answers) Closed 7 years ago.

I am getting a SIGABRT error when I'm trying to show my modalviewcontroller.

This is the code:

    LoginPage *loginPage = nil;   
    loginPage = [[LoginPage alloc] initWithNibName:@"LoginPage" bundle:nil];
loginPage.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentModalViewController:loginPage animated:YES];
[loginPage release];

I'm getting the error on the line: [self presentModalViewController:loginPage animated:YES];

Can anyone help?

Code Update`

Modalviewcontroller problem [duplicate]

Error Message

Terminating app due to u开发者_开发技巧ncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tableView.'

Thanks.


Not sure why youre setting loginPage to nil. Try

LoginPage *loginPage = [[LoginPage alloc]initWithNibName:@"LoginPage" bundle:nil];


Have you checked if the loginPage is nil?

0

精彩评论

暂无评论...
验证码 换一张
取 消