I am doing things within the edit mode of UITableView using editingStyleForRowAtIndexPath to return UITableViewCellEditingStyleInsert or UITableViewCellEditingStyleDelete.
It works rather well, but there one thing I tried with no success.
I tried the following, using the bitwise or operator:
return UITableViewCellEditingStyleInsert|UITableViewCellEditingStyleDelete;
hoping to return to return UITableViewCellEditingStyleInsert and UITableViewCellEditingStyleDelete at the same time.
I do not see why it should not be possible. I would just mean that I want to be able to delete the cell and I also want to be able to insert one other cell before.
But how about the reality?
Am I missing some point?
It’s by design, a cell can only have one editing style. Besides the controls are placed in the same location. Also the way the enum is defined:
It’s not designed for ORing like some option enums are, for example the
UIViewAutoResizingMaskfromUIView: