diff --git a/HPReorderTableView/HPReorderTableView.m b/HPReorderTableView/HPReorderTableView.m index b7d3fc7..0b72f2e 100644 --- a/HPReorderTableView/HPReorderTableView.m +++ b/HPReorderTableView/HPReorderTableView.m @@ -123,6 +123,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N { UITableViewCell *cell = [self dequeueReusableCellWithIdentifier:HPReorderTableViewCellReuseIdentifier]; cell.accessoryType = UITableViewCellAccessoryNone; + cell.layer.zPosition = -10; return cell; } else @@ -296,7 +297,7 @@ - (void)removeReorderDragView - (void)reorderCurrentRowToIndexPath:(NSIndexPath*)toIndexPath { [self beginUpdates]; - [self moveRowAtIndexPath:toIndexPath toIndexPath:_reorderCurrentIndexPath]; // Order is important to keep the empty cell behind + [self moveRowAtIndexPath:_reorderCurrentIndexPath toIndexPath:toIndexPath]; if ([self.dataSource respondsToSelector:@selector(tableView:moveRowAtIndexPath:toIndexPath:)]) { [self.dataSource tableView:self moveRowAtIndexPath:_reorderCurrentIndexPath toIndexPath:toIndexPath];