Not an editable section of a UITableView?

I have a UITableView with three sections. The top two sections are static, and the third can be user-controlled. By overriding the commitEditingStyle method, I can delete entries as needed from section 3. However, the Delete button appears in the cells in sections 0 and 1, although I only execute code when the selected cell is in section 3.

It seems to me that this is confusing if the delete button can be raised on sections 0 and 1, even if the code does nothing. Is there a way to set sections 0 and 1 so that the left-> right areas do not change these sections?

Thank!

+3
source share
1 answer

- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath

+12

Source: https://habr.com/ru/post/1736236/


All Articles