I have multiple values for user selection.
When user selects multiple options then it should be saved in the array.
When user deselects the value then it should remove the same from the array.
How can it be done?
There can be any random selection and deselection from the options.
How can it be done?
Assuming that you want to do this using a table view, you can maintain an mutable array of selected index paths. You can set accessory type to check mark to indicate selection.
and use the array to set the
accessoryTypeproperly during cell initialization.