iPad:迭代UITableView中的每个单元格? [英] iPad: Iterate over every cell in a UITableView?
本文介绍了iPad:迭代UITableView中的每个单元格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
iPad:迭代UITableView中的每个单元格?
iPad: Iterate over every cell in a UITableView?
推荐答案
for (int section = 0; section < [tableView numberOfSections]; section++) {
for (int row = 0; row < [tableView numberOfRowsInSection:section]; row++) {
NSIndexPath* cellPath = [NSIndexPath indexPathForRow:row inSection:section];
UITableViewCell* cell = [tableView cellForRowAtIndexPath:cellPath];
//do stuff with 'cell'
}
}
这篇关于iPad:迭代UITableView中的每个单元格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文