错误1:[UIView tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x45fad0
错误2:setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tableView.'
What that is saying is that someone sent the ‘tableView:numberOfRowsInSection:’ method to a UIView. And the UIView class does not recognize that method. My guess is that the datasource for your tableView is connected to the view instead of the files owner.
查看xib的File's Owner点击弹出的框显示 ui之间的关系才比较清楚。
找到的原因是:self.viewController = [[CJQViewController alloc] initWithNibName:@"CJQ2ViewController" bundle:nil];
CJQ2ViewController.xib没有用CJQ2ViewController来初始化,并且CJQViewController里面没有实现tableView的相关方法。