Created
July 19, 2012 11:51
-
-
Save danielctull/3143272 to your computer and use it in GitHub Desktop.
New moveDown
This file contains hidden or 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
| - (void)moveDown { | |
| NSIndexPath *indexPath = [_tableViewController.tableView indexPathForSelectedRow]; | |
| UITableViewCell *cell = [_tableViewController.tableView cellForRowAtIndexPath:indexPath]; | |
| UIView *bg = cell.selectedBackgroundView; | |
| cell.selectionStyle = UITableViewCellSelectionStyleNone; | |
| cell.selectedBackgroundView = nil; | |
| indexPath = [NSIndexPath indexPathForRow:indexPath.row+1 inSection:indexPath.section]; | |
| [_tableViewController.tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionBottom]; | |
| cell = [_tableViewController.tableView cellForRowAtIndexPath:indexPath]; | |
| cell.selectionStyle = UITableViewCellSelectionStyleBlue; | |
| cell.selectedBackgroundView = bg; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment