UITableView separator line disappears when selecting cells in iOS7 -


in tableview set separator line between cells. allowing selection of multiple cells. here's code setting selected cell background color:

uiview *cellbackgroundcolorview = [[uiview alloc] initwithframe:cell.frame]; [cellbackgroundcolorview setbackgroundcolor:[uicolor darkgray]]; [cell setselectedbackgroundview:cellbackgroundcolorview]; 

the problem if 2 adjacent cells selected, there no separator line between them in ios7, while there (as expected) in ios6.

i tried setting cellbackgroundcolorview's frame height of cell.frame - 1.0, doesn't work either.

any ideas?

i haven't gotten bottom of yet (at first glance seems ios 7 bug..), have found workaround. in tableview:didselectrowatindexpath, if send both messages below, issue visually resolved (with probable performance cost).

[tableview deselectrowatindexpath:indexpath animated:yes]; [tableview reloadrowsatindexpaths:@[indexpath] withrowanimation:uitableviewrowanimationautomatic]; 

for work (for me), deselectrowatindexpath:animated: must contain animated:yes. animation used reloadrowsatindexpaths:withrowanimation: doesn't matter.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -