MaherKSantina / MSPeekCollectionViewDelegateImplementation

A custom paging behavior that peeks the previous and next items in a collection view
https://medium.com/@maher.santina90/how-to-create-cells-that-peek-on-the-sides-like-ios-11-app-store-ef4bb54c0c7d
MIT License
356 stars 32 forks source link

Top and Bottom spacing of UICollectionViewCell cut #68

Closed Thonyvb closed 4 years ago

Thonyvb commented 4 years ago

First, thanks for your framework it has helped a lot!

I have an issue: My custom UICollectionViewCell has a shadow at the bottom, but MSPeekCollectionViewDelegateImplementation is cutting the shadow. Is there a way to add extra spacing to top and bottom between the UICollectionViewCell and collectionView height so the shadow appears?

Thanks!

MaherKSantina commented 4 years ago

Hello @Thonyvb! Thank you so much and thank you for opening this issue! Okay so for this we have 2 solutions without changing the library:

  1. Disable Clips to Bounds on the UICollectionViewCell and the parent views of the one with the shadow
  2. Make the shadow span on a subview of the UICollectionViewCell not the UICollectionViewCell itself, and add some margins around the subview depending on how big the shadow is

Please let me know if what I wrote doesn't make sense I'm happy with explaining them more

Have a great day!

Thonyvb commented 4 years ago

Thanks a lot! It works as expected now!