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

Use of undeclared type 'MSCollectionViewPeekingBehavior' #64

Closed ihsaan-ullah closed 4 years ago

ihsaan-ullah commented 4 years ago

After installing the pod pod 'MSPeekCollectionViewDelegateImplementation' and using it in a ViewController. I get this error on declaration of behaviour variable

var behavior: MSCollectionViewPeekingBehavior!

Error: Use of undeclared type 'MSCollectionViewPeekingBehavior'

MaherKSantina commented 4 years ago

Hello @ihsanullah2131 Thank you for contributing to this repo by raising this issue! I need you to check a couple of things to see what the problem is

  1. We need to make sure that you have the latest pod version because this class doesn't exist on previous versions of the pod. To do that you can check the Podfile.lock file and see which version of the pod is installed
  2. We need to make sure that you included the import header:
    import MSPeekCollectionViewDelegateImplementation
ihsaan-ullah commented 4 years ago
  1. We need to make sure that you have the latest pod version because this class doesn't exist on previous versions of the pod. To do that you can check the Podfile.lock file and see which version of the pod is installed

Version is 2.0.0

  1. We need to make sure that you included the import header:

Yes import is correct

MaherKSantina commented 4 years ago

So version 2.0.0 of the pod is not the latest one, you need to update the pod version to 3.1.1 to for it to work

MaherKSantina commented 4 years ago

@ihsanullah2131 I'll close this. Feel free to open it if the issue is still there!

Have a great day! 🙏