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

Foward delegete method invocations #16

Closed
wants to merge 1 commit into from

Conversation

akkyie
Copy link
Contributor

@akkyie akkyie commented May 19, 2022

GridView forwards responds(to:) to originDelegate.

override open func responds(to aSelector: Selector!) -> Bool {
return originDelegate?.responds(to: aSelector) == true || super.responds(to: aSelector)
}

If originDelegate implements a delegate method, however, the method invocation is not forwarded to the originDelegate and results in an exception:

-[G3GridView.GridView scrollViewWillBeginDragging:]: unrecognized selector sent to instance 0x7f811c15f800

This PR addresses this problem by forwarding the actual invocation to the delegate.

@akkyie
Copy link
Contributor Author

akkyie commented May 19, 2022

Sorry, I found that there is an ObjC category for forwarding invocations after I created this PR.
https://github.com/abema/GridView/blob/master/GridView/GridView%2BDelegateProxy.m

Closing this PR for now as the problem above is likely due to our installation method.

@akkyie akkyie closed this May 19, 2022
@akkyie akkyie mentioned this pull request May 19, 2022
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

Successfully merging this pull request may close these issues.

None yet

1 participant