Я хочу оживить UICollectionViewCell
при вызове действия.
я сделал UICollectionViewCell
в Interface Builder
, UICollectionView
.
Теперь я хочу получить правильный indexPath
по моему методу actionBtnAddToCard
.
Вот как я это делаю сейчас (метод в ProduktViewCell.m):
- (IBAction)actionAddToCart:(id)sender {
XLog(@"");
// see this line
NSIndexPath *indexPath = ??** how can i access the correct indexPath**??;
SortimentViewController *svc = [[SortimentViewController alloc] initWithNibName:@"SortimentViewController_iPad" bundle:[NSBundle mainBundle]];
[svc.collectionViewProdukte cellForItemAtIndexPath:indexPath];
[svc collectionView:svc.collectionViewProdukte didSelectItemAtIndexPath:indexPath];
}
SortimentViewController - это viewController, который наследует UICollectionView.
как получить правильный indexPath?
ОБНОВЛЕНИЕ 1: отредактированный пост для лучшего понимания.