You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minor correction. If your collection view has contentInsets for example of UIEdgeInsets(top: 0, left: 24, bottom: 0, right: 24), the contentOffset.x will be -24 initially, so if you fall back to 0 when there's no stored offset that causes it to scroll over inappropriately.
This is the fix (but requires the collectionView not be private): tableViewCell.collectionViewOffset = storedOffsets[indexPath.row] ?? -tableViewCell.collectionView.contentInset.left
The text was updated successfully, but these errors were encountered:
Minor correction. If your collection view has
contentInsets
for example ofUIEdgeInsets(top: 0, left: 24, bottom: 0, right: 24)
, thecontentOffset.x
will be -24 initially, so if you fall back to 0 when there's no stored offset that causes it to scroll over inappropriately.Currently:
tableViewCell.collectionViewOffset = storedOffsets[indexPath.row] ?? 0
This is the fix (but requires the collectionView not be private):
tableViewCell.collectionViewOffset = storedOffsets[indexPath.row] ?? -tableViewCell.collectionView.contentInset.left
The text was updated successfully, but these errors were encountered: