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

Evaluate hidden/disabled at onCellSelection callback #10

Closed
phiberjenz opened this issue Oct 1, 2015 · 2 comments
Closed

Evaluate hidden/disabled at onCellSelection callback #10

phiberjenz opened this issue Oct 1, 2015 · 2 comments

Comments

@phiberjenz
Copy link
Contributor

Maybe I'm doing it wrong, but is it possible to evaluate if a row/section should be hidden based on if another row is selected?

I can get it to work when the value of the other row changes, but not when it is selected.

EDIT:
Is there no possibility to set the hidden status of a row from another function? I'm trying to set one rows hidden status from another rows onCellSelection handler, but it doesn't work. I can hide the CELL, but not the row. Any ideas?

Regards,
Jens

@mtnbarreto
Copy link
Member

@phiberjenz I have never tried but i think this may work:
I'm not sure what row selection means for you...

row.onCellSelection { [weak row2] in cell, row in  // on cell selection is invoked every time didSelectCellAtIndexPath Is Invoked
        row2.evaluateHidden()
}

if it doesn't work you can also play with onCellHighlight callback that was added to master branch (not available on 1.0.0).

@phiberjenz
Copy link
Contributor Author

Thanks, evaluateHidden() did the trick. Works like a charm.

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

No branches or pull requests

2 participants