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

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

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