-[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] ERROR


UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITableView dequeueReusableCellWithIdentifier:forIndexPath:]: unrecognized selector sent to instance 0x7257800'

 今天新建立一個TableView的時候,偶然發現這樣的錯誤,因為用的是XCode自己生成的代碼,好奇怪,想了想到底是為什么呢?

看了下Documents,oh shit!我用的Base 是5.0SDK.

Available in iOS 6.0 and later.

 遂改之:

UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM