Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ios-sdk] Remove dependency on [UITableView allowsMultipleSelection]
Summary: We were using an API that was iOS 5.0+ only, and we want to support 4.3. We were only half-relying on it anyway to determine whether to select or deselect an item. Now we rely on the FBGraphObjectTableSelection class to know whether an item is selected or not, rather than relying on the UITableView. This also fixes a bug I discovered while fixing this one, where in non-multi-select mode, the friend picker would not correctly deselect an item that had scrolled far off the screen (because the UITableView returned nil in response to cellForRowAtIndexPath, causing us to skip the deselect). In multi-select mode, we ignore deselect events entirely and treat select as a toggle, much as before, except that we do not rely on calling cellForRowAtIndexPath. In single-select mode, we do handle deselect events to ensure that only one item at a time is selected. (We also treat select as a toggle, so selecting the same item twice deselects it.) Test Plan: - Ran the FriendPickerSample with the picker in both single and multi-select modes. - Selected and unselected lots of items, both near each other and far apart in the list, verifying that the selection state was as-expected each time. Revert Plan: Reviewers: jacl, mmarucheck, gregschechte, ayden Reviewed By: jacl CC: platform-diffs@lists Differential Revision: https://phabricator.fb.com/D493114 Task ID: 1121147
- Loading branch information
Chris Lang
committed
Jun 13, 2012
1 parent
b67aec4
commit 07bd2cf
Showing
4 changed files
with
33 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters