hi i have a problem with the selection when I select a row in uitableviewcell it selects and turns to blue with out making any animation i开发者_JAVA技巧 mean normally when a row in table is selected it turns into blue and go off immediately like an animation. How to achieve that? Not deslecting a row....it is like highlight the cell and go off when cell is selected by user...Can any one help please....
From the Table View Programming Guide, Responding to Selections:
In your tableView:didSelectRowAtIndexPath:
method add the following:
[tableView deselectRowAtIndexPath:indexPath animated:NO];
"Selecting" does the blue-highlight animation, "deselecting" flashes it back to normal color. By adding a deselection as soon as it's selected you get the effect of flashing it with color.
If you want to avoid the whole coloring thing, you can use UITableViewCellSelectionStyleNone
as your cell style.
精彩评论