Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selection not working. #36

Closed
thejeraldo opened this issue Feb 13, 2019 · 4 comments
Closed

Selection not working. #36

thejeraldo opened this issue Feb 13, 2019 · 4 comments

Comments

@thejeraldo
Copy link

@objc optional func peekImplementation(_ peekImplementation: MSPeekCollectionViewDelegateImplementation, didSelectItemAt indexPath: IndexPath) doesn't work and not even appears on the autocomplete in Xcode.

Checking MSPeekCollectionViewDelegateImplementation from the Pod project it seems it is not in the MSPeekImplementationDelegate. Only the following is shown:

public protocol MSPeekImplementationDelegate: AnyObject {
    func peekImplementation(_ peekImplementation: MSPeekCollectionViewDelegateImplementation, didChangeActiveIndexTo activeIndex: Int)
}

func peekImplementation(_ peekImplementation: MSPeekCollectionViewDelegateImplementation, didChangeActiveIndexTo activeIndex: Int) seems to be working fine.

And my current implementation is as below:

let peekImplementation = MSPeekCollectionViewDelegateImplementation(cellSpacing: 16.0, cellPeekWidth: 16.0)

collectionView?.dataSource = self
collectionView?.configureForPeekingDelegate()
collectionView?.delegate = peekImplementation
peekImplementation.delegate = self

Am I missing something?

@MaherKSantina
Copy link
Owner

Thanks @thejeraldo for raising this issue. Are you sure that you are using the latest version of this pod? This function was introduced in version 1.1.0. Waiting for your reply

@thejeraldo
Copy link
Author

Yes I am. I believe it was not included in 1.1.0 as it is there in 1.0.0 after checking both tags.

@thejeraldo
Copy link
Author

Sorry. It is there in 1.1.0, I just installed MSPeekCollectionViewDelegateImplementation this week. Not sure why it wasn't on 1.1.0 and had to specify the tag on the Podfile.

Thanks by the way for this amazing library. Cheers!

@MaherKSantina
Copy link
Owner

Ohh maybe the pods on your machine are not up to date with the Cocoapods repo because the 1.1.0 version was not long ago.

Haha no worries mate I'm glad your issue is fixed. Let me know if you experience any problems 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants