2012-07-21 10:21:24.523 Control Fun[1237:f803] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "ViewController" nib but the view outlet was not set.'
*** First throw call stack:
(0x13c9022 0x155acd6 0x1371a48 0x13719b9 0xda2dd 0xda779 0xda99b 0x39401 0x39670 0x39836 0xc881dd8 0x4072a 0x22eb 0x11386 0x12274 0x21183 0x21c38 0x15634 0x12b3ef5 0x139d195 0x1301ff2 0x13008da 0x12ffd84 0x12ffc9b 0x11c65 0x13626 0x1ff2 0x1f65)
terminate called throwing an exception(lldb) 

解决方案 »

  1.   

    nib文件中的view没连到你UIViewController的view上
      

  2.   

    确定你从对应.xib文件里面获取的view和你的左值view是否一致?
    例如:
    UITableViewCell *cell = [[[NSBundle mainBundle] loadNib:@"XXX"] objectAtIndex:YYY];
    1、XXX不需要填写后缀。
    2、YYY表示.xib里面的view序号,如果是一个,通常用lastObject就可以。
    3、确定你的.xib里的view是UITableViewCell?