Changing color of single UITableView Cell in iOS Swift -


i want able change color of single uitableview cell. in tableview(editactionsforrowatindexpath) can swipe cell , select button change background color when scroll cell off screen changes back. how retain color? thanks

assuming have 1 section in tableview many rows, need in tableview:cellforrowatindexpath: method:

if (indexpath.row == coloredcellindex) {      cell.backgroundcolor = uicolor.redcolor() } else {      cell.backgroundcolor = uicolor.whitecolor() } 

you need set variable coloredcellindex anywhere outside of function, example in viewdidload


Comments

Popular posts from this blog

javascript - Feed FileReader from server side files -

How to Change swipe Tab Title color in java Android -

Using globs in Perl replace one liner in TCL script -