I am working on a checklist app and I already figured out how to add items to my table view. Now I would like to add a checkbox to my dynamic table view cell. If the user finished one of his tasks, he should be able to press the checkbox and the setting should be saved. My problem is, that I tried this with a UISwitch, but the setting is saved for each table view cell and not for the one the user had chosen.
I tried in cellForRowAt indexPath:
cell.switch.tag = indexPath.row
but it didn’t work.
Does someone know how to solve this problem or how to make a checkbox ( as an image )?
Aucun commentaire:
Enregistrer un commentaire