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 は、UICollectionView を継承する viewController です。
正しいindexPathにアクセスするには?
更新 1: 理解を深めるために投稿を編集しました。