から に移動している間first view controller、インデックスパスsecond view controllerを配列に保存し、 にテーブルをロードするときに戻りますfirst view controller。現在のインデックスパスが保存されたインデックスパス配列にある場合、カスタム アクセサリ ボタンを作成する必要があります。
UITableviewただし、必要なセルと一緒にスクロールすると、別のセルにもカスタムボタンが表示されます。NSindexPathsスクロール中に印刷すると、通常の値ではなくランダムな値が得られます。
上記の場合、次のコードを使用しています。
- (UITableViewCell *)tableView: (UITableView *)tableView cellForRowAtIndexPath: (NSIndexPath *)indexPath
{
   // NSLog(@"newdata value is =%d",newData);
    AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
    UITableViewCell *cell = [self.positionsTable dequeueReusableCellWithIdentifier:@"playersInPosition"];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"playersInPosition"]autorelease];
    }
    UILabel *lblName = (UILabel *)[cell viewWithTag:100];
    [lblName setText:[inputData objectAtIndex:[indexPath row]]];
    UILabel *pname = (UILabel *)[cell viewWithTag:102];
    [pname setText:[appDelegate.playersNFL objectAtIndex:[indexPath row]]];
      for (NSIndexPath *object in appDelegate.indexPathList) {
    if ([object isEqual:indexPath]) {
        NSLog(@"saved index path values are =%@",appDelegate.savedIndexPath);
        UIButton *button = [self ChangeAccessoryButtonStyle:appDelegate.indexPathList[0]];
        cell.accessoryView = button;
    }
    }
        return cell;
}