Abhinav
Abhinav

Reputation: 38142

Delegate on tap of - button on UITableViewCell

Is there any delegate that gets called when we tap on the "-" button and delete button comes on the cell on the right side. I want to disable some label on the cell once this button is tapped.

Upvotes: 0

Views: 561

Answers (1)

Mudit Bajpai
Mudit Bajpai

Reputation: 3020

When you swipe on the row of UITableView it will call

(void)tableView:(UITableView *)tableView willBeginEditingRowAtIndexPath:(NSIndexPath *)indexPath

after tapping on the delete button it will call

(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath

and finally

(void)tableView:(UITableView *)tableView didEndEditingRowAtIndexPath:(NSIndexPath *)indexPath

Upvotes: 2

Related Questions