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

libGdx unable to find files in android application data directory -

php - Webix Data Loading from Laravel Link -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -