註釋掉在UITableView中重用單元的代碼有害嗎?防止UITableView重用UITableViewCell?
// if (cell == nil)
// {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
// }
謝謝。
編輯:根據@jrturton的回覆,我決定不這樣做。
我需要在表中放置一個圖像,我已經遵循了'http:// www.markj.net/iphone-asynchronous-table-image /'但我有一些奇怪的行爲,所以我認爲創建一個新的細胞每次都會解決問題。謝謝。 –
哦,謝謝...我真的嘗試過這個,但只添加了兩個標識符,一個用於圖像單元格,其他用於其他標識符..當我應用您的方法時,它才起作用。謝謝。 –
這種方法唯一的問題是,它不適用於原型單元 – Camus