Same prb for me
Closed this issue · 1 comments
xhzengAIB commented
I create the issue on other lib
izotx/JMCMarchingAnts#1 (comment)
fdzsergio commented
if you want to focus selected cell on tap, you can calculate the offset with following code
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
SFFocusViewLayout *focusViewLayout = (SFFocusViewLayout *)collectionView.collectionViewLayout;
CGFloat offset = focusViewLayout.dragOffset * indexPath.item;
if (collectionView.contentOffset.y != offset) {
[collectionView setContentOffset:CGPointMake(0, offset) animated:YES];
}
}
i've updated the example with this feature