A good example of the behavior I’m trying to illustrate is when you click on the “Edit” button in the iOS Clock app, the on/off switch transforms into a chevron.
I have a UITableView that contains a cell with a switch control on it. When the user click the “Edit” button in the UINavigationBar, I’d like the switch to go away and get replaced with a chevron. I’m new to iOS development, so up to this point I really only understand how to change the editing mode of the UITableView and delete cells.
How do I configure a UITableViewCell to hide it’s switch control and display the chevron when the user clicks the “Edit” button in the UINavigationBar?
Thanks so much in advance for your help!
It might be better to actually set your
cell.editingAccessoryViewto your UISwitch object, and just have thecell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;. That way, when the user hits the Edit button, your chevron will slide out and your UISwitch will slide in without any additional work on your part.