A picture’s worth a thousand words…

For a bit more background, I have a UITableView leveraging iOS 5’s allowsMultipleSelectionDuringEditing set to YES. This results in the empty and filled edit controls being shown on the left of the cell any time the cell is in edit mode. This behavior is exactly what I want. I just want to change the appearance of these check marks.
I know it would be possible to write custom selection logic and basically roll my own version (like this and this), but that’s what I want to avoid. The system is already in place, and I want to re-use as much of it as possible.
This is the closest I’ve come. It’s simple and it works, while reusing almost all of the pre-baked system. It’s also a giant hack however, and relies on exploiting the undocumented view hierarchy of
UITableViewCellafter a little runtime introspection.In a nutshell, this simply hides the view normally responsible for showing the checkmark, allowing me to add my own view that can be shown in its place. I can then manipulate this stand-in view when the cell’s selection or editing state changes…
To prevent the standard checkmark from appearing, all that’s needed is a custom
-layoutSubviewsimplementation. It’s called, per the documentation, after both-willTransitionToState:and-setEditing:animated:, ensuring the state is always valid when eitherisSelectedorisEditingchanges.I would still welcome a solution that’s a bit more… kosher.