Iphone 如何在DidSelectRowatineXpath中查找节:方法
是否可以在tableView DidSelectRowatineXpath:(NSIndexPath*)indexPath方法中找到我正在单击的行的部分Iphone 如何在DidSelectRowatineXpath中查找节:方法,iphone,objective-c,ios,xcode,Iphone,Objective C,Ios,Xcode,是否可以在tableView DidSelectRowatineXpath:(NSIndexPath*)indexPath方法中找到我正在单击的行的部分 TIAindexPath参数具有可访问的section属性,如下所示 [indexPath section]; 或 你是指特定索引的部分或选择吗? indexPath.section -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPat
TIAindexPath参数具有可访问的section属性,如下所示
[indexPath section];
或
你是指特定索引的部分或选择吗?
indexPath.section
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if(indexPath.section==0)
{
// 1st Section of the tableView.
if(indexPath.row==0)
{
// 1st cell of the 1st section.
}
}
}
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
int section = [indexPath section];
}
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:
(NSIndexPath*)indexPath{
int section = [indexPath section];
NSLog(@"section %d",section);
}