I have a UITableView with multiple sections, and I want to make only one section editable (swipe to delete).
I have a feeling I have to do something in the willBeginEditingRowAtIndexPathdelegate method, but I can't seem to figure it out.
Use
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
return YES for allowing editable, otherwise NO.
You can use the below function for what you look for:
-(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
Return YES to whichever row you want to edit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With