Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

TUITableView - selectRowAtIndexPath always makes cell a first responder #9

Open
k7d opened this issue Jul 4, 2011 · 6 comments
Open

Comments

@k7d
Copy link
Contributor

k7d commented Jul 4, 2011

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

@lorenbrichter
Copy link
Contributor

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

@k7d
Copy link
Contributor Author

k7d commented Jul 4, 2011

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.

@lorenbrichter
Copy link
Contributor

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

@k7d
Copy link
Contributor Author

k7d commented Jul 26, 2011

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

@brutella
Copy link
Contributor

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

@lorenbrichter
Copy link
Contributor

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.

brutella added a commit to brutella/twui that referenced this issue Oct 20, 2011
lorenbrichter pushed a commit that referenced this issue Nov 2, 2011
Merge of fix for issue #9 from @k7d into main project
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants