当我触摸视图控制器中的uitextfield时,我得到了下面的错误信息。
味精:
*** 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)'这个错误到处都会显示并总是崩溃(所有视图控制器)。
发布于 2013-09-21 20:34:41
我也有同样的崩溃,有趣的是,我忘了传递nib的名字。
错误代码:
MyViewController *vc = [[MyViewController alloc] initWithNibName:@"" bundle:nil];
[self.navigationController pushViewController:vc animated:YES];
[vc release]好的代码:
MyViewController *vc = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil];
[self.navigationController pushViewController:vc animated:YES];
[vc release]发布于 2015-06-28 05:18:20
如果你来这里是因为你在编写swift时得到了这个,请确保你的初始视图控制器在属性检查器中选中了“是初始视图控制器”。
https://stackoverflow.com/questions/18438768
复制相似问题