0

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`

enter image description here

Error Message

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tableView.'

Thanks.

K.Honda
  • 3,106
  • 5
  • 26
  • 37

2 Answers2

0

Have you checked if the loginPage is nil?

cxa
  • 4,238
  • 26
  • 40
  • put in an NSLog, have you tried removing the first line of the code? – Jordan Brown Jun 22 '11 at 14:30
  • @Jordan Brown: I'm not sure why it's throwing an error because I have another view calling another modalviewcontroller and that works perfectly... Do you know why? Thanks. – K.Honda Jun 22 '11 at 15:26
0

Not sure why youre setting loginPage to nil. Try

LoginPage *loginPage = [[LoginPage alloc]initWithNibName:@"LoginPage" bundle:nil];
Jordan Brown
  • 638
  • 1
  • 5
  • 14