通过实践,要是把下面三个协议方法都实现了就不会报错了。另外还需要注意!的问题。
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int{}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell{
}
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath){
tableView.deselectRowAtIndexPath(indexPath, animated: true)
}