jak uzyskać indexPath dla komórki, która znajduje się w centrum UICollectionView

Jak mogę znaleźćindexPath dlacell w środkuUICollectionView?

Mam przewijanie w poziomie i tylko jedno dużecell jest widoczny (częściowo dwa innecells po bokach są również widoczne). Muszę usunąćcell znajduje się w centrum (oznacza - prądcell) bez dotykania go.

Tylko naciśnięcie przycisku „Kosz” i potwierdzenie Usuń. Ale teraz usuń tylko pierwszycells.

- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex {
    if (buttonIndex == actionSheet.destructiveButtonIndex) { 
        initialPinchPoint = ????????

        self.tappedCellPath = [self.collectionView indexPathForItemAtPoint:initialPinchPoint];

        Technique *technique = [arrayOfTechnique objectAtIndex:self.tappedCellPath.row];

        [self deleteData:[NSString stringWithFormat:@"DELETE FROM TECHNIQUES WHERE TECHNIQUENAME IS '%s'",[technique.techniquename UTF8String]]];

        [arrayOfTechnique removeObjectAtIndex:self.tappedCellPath.row];

        //[arrayOfTechnique removeObjectAtIndex:[custom_layout ]];
        [self removeImage:technique.techniquename];

        [self.collectionView performBatchUpdates:^{
            [self.collectionView deleteItemsAtIndexPaths:[NSArrayarrayWithObject:self.tappedCellPath]];
         } completion:nil];

         [self checkArrayCount];
    }
}

questionAnswers(9)

yourAnswerToTheQuestion