我用魔杖在返回heightForRowAtIndexPath時知道單元格的內容。在這個函數中,我如何獲得單元格對象?如何獲取tableView中的單元格對象:(UITableView *)tableView heightForRowAtIndexPath函數?
- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
}
如果我試試這個
[tableView cellForRowAtIndexPath:indexPath]
失敗和無限循環熄滅。
有什麼想法?
這是錯誤的,你可以在這種情況下發送'tableView:cellForRowWithIndexPath'。 @user ...只是將它發送給錯誤的對象。 – XJones 2011-04-12 17:57:10