twui icon indicating copy to clipboard operation
twui copied to clipboard

TUITableView - selectRowAtIndexPath always makes cell a first responder

Open k7d opened this issue 13 years ago • 6 comments

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).

k7d avatar Jul 04 '11 15:07 k7d

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...

lorenbrichter avatar Jul 04 '11 16:07 lorenbrichter

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.

k7d avatar Jul 04 '11 16:07 k7d

I really like that - should happen on keyboard up/down also you think?

lorenbrichter avatar Jul 25 '11 22:07 lorenbrichter

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

k7d avatar Jul 26 '11 06:07 k7d

Any plans to integrate this into the main project? Really need this!

brutella avatar Oct 15 '11 17:10 brutella

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.

lorenbrichter avatar Oct 17 '11 19:10 lorenbrichter