Skip to content

Commit

Permalink
Disabling swipe-to-delete while adding a list or a task
Browse files Browse the repository at this point in the history
  • Loading branch information
sascha committed Dec 3, 2012
1 parent 3aa5953 commit be4e134
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/CDIListsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
}

- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
if (_adding && indexPath.row == 0) {
if (_adding) {
return NO;
}

Expand Down
7 changes: 7 additions & 0 deletions Classes/CDITasksViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,13 @@ - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger
return self.addTaskView;
}

- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
if (self.coverView.alpha == 1.0f) {
return NO;
}

return YES;
}

#pragma mark - UITableViewDelegate

Expand Down

0 comments on commit be4e134

Please sign in to comment.