Multi selection can be easily solved with the standard checkmark accessory type:
You can set it to as many cells as you want:
cell.accessoryType = selectedIndexes[indexPath.row] ? .checkmark : .none
selectedIndexes is a simple array of booleans in my case. I update them in
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)
You should decide for yourself how the selection data is stored.
Now, let's not mix the concepts when we talk about checkboxes. Traditional checkbox that came to web from PC is a control that allows to turn on/off a single value. It was designed for GUI which used mouse. Switch control in iOS has the same purpose, but designed for touch interface.
As Chriskowalskowski said:
you have to distinguish between a task where the user has to set a Boolean state (on/off) ... or, let the user select multiple cells which contain information
Both traditional check-box, and switch are designed to do the former - allow user to set on/off state.
Also, a similar looking checkmark started to be used in list views on PC to allow multiple selection. Although, checkbox control may be used inside the list view, the purpose of it is different - to indicate selected row rather than turn an option on/off.
There are two ways of doing multiple selection in UITableView.
First, as I demonstrated above - allows user to pick one ore more options from the list and proceed. This is a simple out-of-the-box solution.
Another one, as demonstrated by Lisa Tweedie and Jason Hibbs, when the selection indicator - white checkmark inside blue circle - is displayed on the left side. This one is primarily used for group operations with the items themselves, i.e. editing, moving, rather than to indicate selected choice. See Mail application for example.