There are lots of similar questions on here, but none that I think specifically ask this question, which is, is there any way in code to force the red delete button to appear at the right-side of a UITableView row?
The reason I ask is that I'm trying to change the behaviour of a tableview using two UISwipeGestureRecognizers such that:
a single-finger swipe invokes a custom action (instead of causing the red delete button to show, which is how it behaves now), and
a double-finger swipe invokes the default single-finger swipe behaviour, i.e. causes the red delete button to show.
I have scoured through the SDK docs but I can't find any way of causing that red button to appear, which makes me think that the proposed UI scheme above is impossible to implement without manually creating the red delete button from scratch and trying to make it emulate the built-in one's behaviour.
Any help is much appreciated.
editButtonItem
, i.e. it reveals the editing accessory for that cell, which in most cases is the little blue detail disclosure indicator, not the red delete button. Since there is no such thing asUITableViewCellAccessoryDeleteButton
to parallelUITableViewCellAccessoryDetailDisclosureButton
, invokingsetEditing:
on a cell doesn't help. There is a[UITableCellView showingDeleteButton]
but its a readonly property :( – HubbleshowingDeleteConfirmation
property is still read-only, and even thoughUITableViewCellStateShowingDeleteConfirmationMask
is exposed and can be reacted to in the state transition callbacks, I can't see a way to manually trigger those state transitions such that the red delete button will appear. – Hubble