我有一个名为" team"和所有类的项目称为" teamType"。在我的方法中,我想检查" teamType"的对象索引。来自"团队"的索引阵列:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
teamType *te = [[teamType alloc]init];
//here I want to check te's index depending on the indexpath
[[NSUserDefaults standardUserDefaults]setObject:[te Name] forKey:@"buttonSelected"];
}
答案 0 :(得分:0)
teamType *te = teams[indexPath.row];