是否有可能找到我在tableView didSelectRowAtIndexPath中單擊的行的部分:(NSIndexPath *)indexPath方法。如何在didSelectRowAtIndexPath中找到部分:方法
TIA
是否有可能找到我在tableView didSelectRowAtIndexPath中單擊的行的部分:(NSIndexPath *)indexPath方法。如何在didSelectRowAtIndexPath中找到部分:方法
TIA
的indexPath參數有訪問截面屬性如下
[indexPath section];
OR
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);
}
迪你是指部分或選擇特定的索引? – 2012-08-06 11:00:48