Skip to content

Sibling responders not detected when textfields are placed in custom views in same viewcontroller #154

Closed
@7vikram7

Description

Hi,
Thank you for the excellent library. I have stumbled upon one case while creating a form.
screen shot 2015-01-28 at 11 01 55 pm
All the 6 marked in red boxes are separate custom views which are added to the viewcontroller. Notice that the next previous buttons did not appear for this case. For all other forms where the text fields are on the same scrollview/viewcontroller and not on custom views, the next/previous buttons appear and work just fine.

Upon further investigation, I found that the responderSiblings() function is not able to find any siblings for the textfields on these custom views. I also tried replacing responderSiblings() with deepResponderViews() but that too didnt work.
Hence as a temporary fix, I have made a small change in the IQKeyboardManager.m file where if a textfield from this particular viewcontroller comes up, in the responderViews() function, instead of fetching sibling responders from "textFields = [_textFieldView responderSiblings];" I pass an "array of responders", with responders i know exist on the viewcontroller for the textfield.

Have i missed something obvious over here?
Or will the responderSiblings()/deepResponderViews() fuctions have to be improved to fetch all siblings on the viewcontroller?
Or we can just facilitate an option to pass "sibling responders array" to textfields?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions