twui
twui copied to clipboard
TUITableView - selectRowAtIndexPath always makes cell a first responder
Sometimes it's needed to change row selection, but have different control remain as first responder. Now it's problematic, especially since setting first responder may be asynchronous (if selected cell is not visible).
Perhaps it should only be made first responder if done by explicit user interaction (clicking or up/down arrows). Otherwise -selectRowAtIndexPath shouldn't change first responder?
I'm also open to a better make-first-responder-in-the-future mechanism. I'm not crazy about the way it's currently done, but not sure what the alternatives are...
Yeah, I was thinking in the same direction. I've a potential fix already, will test a bit and push to to my fork in a moment.
I really like that - should happen on keyboard up/down also you think?
The table or one of it's cells should already be first responder to react to keyboard events. In which case the new cell will become first responder in my patch (lines 612-616) https://github.com/k7d/twui/commit/e704d0ef64df4c8a95dfb85dfd0ff063d1e2e164#L0R612
Any plans to integrate this into the main project? Really need this!
Does the patch work well with your own project? Been busy – happy to merge if it works for you and you want to bundle it into a pull request.