报错:loaded the "" nib but didn't get a UITableView

在加载OpenPosition界面的时候报错:loaded the "" nib but didn't get a UITableView

 

原因:

If you have a NIB for the UITableViewController subclass then its view outlet must be hooked up to a UITableView.

 

代码:@interface XOpenPositionViewController : UITableViewController

因为XOpenPositionViewController是UITableViewController的子类,

所以在xib文件中,view必须是一个直接的TableView,而不应该是view下面加载的TableView

@interface XOpenPositionViewController : UITableViewController

应该是:Table View而不是view。

posted @ 2014-06-11 10:40  管小木  阅读(174)  评论(0)    收藏  举报