0
有没有什么办法可以得到uitableview头的indexpath?获取UiTableView标头的索引路径?
我有以下代码:
- (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
static NSString *CellIdentifier = @"cell";
LocationCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil){
[NSException raise:@"headerView == nil.." format:@"No cells with matching CellIdentifier loaded from your storyboard"];
}
如上委托方法,没有indexPath通过,可我得到头的indexpath?
您可以在tableView:didSelectRowAtIndexPath方法中获取indexPath, –
您是否指头的indexPath.section? – anhtu
Anbu:当我点击标题单元格时,无法调用didSelect。 anhtu:没有,indexpath。 – Rendy