0

I get the error with below message when I touched uitextfield in view controller.

msg:

*** Assertion failure in -[UINib initWithNibName:directory:bundle:], /SourceCache/UIKit/UIKit-2380.17/UINib.m:96
2013-08-26 15:58:43.547 Xpointer[1023:907] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: (name != nil) && ([name length] > 0)'

This error show and always crash everywhere(all view controller).

Kara
  • 6,115
  • 16
  • 50
  • 57
Choi
  • 11
  • 1
  • 3

2 Answers2

7

I too had the same crash, it was funny, I forgot to pass nib name.

Bad code:

MyViewController *vc = [[MyViewController alloc] initWithNibName:@"" bundle:nil];
[self.navigationController pushViewController:vc animated:YES];
[vc release]

Good code:

MyViewController *vc = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil];
[self.navigationController pushViewController:vc animated:YES];
[vc release]
Hemang
  • 26,840
  • 19
  • 119
  • 186
0

If you come here because you're getting this while writing swift, make sure that your initial view controller has "Is Initial View Controller" checked in the attributes inspector.

mike_haney
  • 545
  • 1
  • 8
  • 18