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 - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -