2014-10-21 16:54:21.802 MyMusic[7318:5042001] *** Assertion failure in -[UISearchResultsTableView dequeueReusableCellWithIdentifier:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-3318/UITableView.m:6116
2014-10-21 16:54:21.806 MyMusic[7318:5042001] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier Cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
运行程序,一点search bar 就报错。
NewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
去掉 forIndexPath :indexPath 改成
NewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
就ok了。