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

Properly deselect row upon view re-appearance #17

Merged
merged 1 commit into from Mar 19, 2014
Merged

Properly deselect row upon view re-appearance #17

merged 1 commit into from Mar 19, 2014

Conversation

pkluz
Copy link

@pkluz pkluz commented Mar 18, 2014

Currently the cell selection tends to bug when the user interactively dismisses an acknowledgement controller. It either stays or lags behind. Fixed by dismissing it manually on view appearance.

@vtourraine
Copy link
Owner

Yes, I’ve noticed that a lot with iOS 7. I’ve always suspected it’s some kind of bug in UIKit, so I’d rather try to avoid this kind of manual fix.

Oh well. It’s still here with iOS 7.1, so I guess we’ll have to do things ourselves. Thanks for the PR. And if someone can find a more elegant solution, you know what to do.

vtourraine added a commit that referenced this pull request Mar 19, 2014
Properly deselect row upon view re-appearance
@vtourraine vtourraine merged commit 070d048 into vtourraine:master Mar 19, 2014
@pkluz
Copy link
Author

pkluz commented Mar 19, 2014

This is in fact not a bug but a feature ;-)

A UITableViewController as a matter of fact has the property "clearsSelectionOnViewWillAppear" but in some cases this is not desired so you can turn it off. Now if you manage the table view yourself, this is entirely up to you. Think of a split view controller on the iPad - you most likely wouldn't want it deselecting automatically in most cases, because the selection is always present.

So it's in fact not a work around if you felt that way but a necessary management of the tableview if you're not using the UITableViewController but decide to do it manually :)

@vtourraine
Copy link
Owner

Well, I’m not so sure about that. This is a standard UITableViewController, and the clearsSelectionOnViewWillAppear property default value is YES. So we shouldn’t have to manually deselect the cell. And as a matter of fact, it does usually deselect itself when you hit the “back” button from the top view controller. The problem is that sometimes it doesn’t, especially when you use the interactive pop gesture, I’ve noticed.

So I’d still call that a bug, but maybe I’m wrong. Anyway, thanks to you we now have the expected result, consistently. Hooray.

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

Successfully merging this pull request may close these issues.

None yet

2 participants