2012-02-25 32 views

回答

6

的UITableView有它给你一个特定的单元格的索引路径的方法:

NSIndexPath *path = [self.tableView indexPathForCell:cell]; 
return path.section; 

注意,这将返回一个整数,而不是字符串。

2

使用的UITableView实例方法:

- (NSIndexPath *)indexPathForCell:(UITableViewCell *)cell