I have a UITableView with an editButtonItem in the navigation bar. I wanted to have a tap sound play whenever the user taps the editButtonItem. Right now, I’m using the following method to play the tap sound when edit button is tapped
- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
//Code to play the tap sound file
[super setEditing:editing animated:animated];}
But the problem I have is that the tap sound also plays when user swipes a tableviewcell & the delete button shows up, which is not something I want. So, my question is, is there a better way to detect when the editButtonItem is tapped?
The below code will play a sound ONLY when the edit button is tapped. When you tap Done it will not play a sound. Also, when you swipe a cell, the sound should not play.