# V6 - Chapter 5 - Cell not updating when moving positions

**URL:** <https://forums.kodeco.com/t/v6-chapter-5-cell-not-updating-when-moving-positions/103950>\
**Category:** Core Data by Tutorials\
**Created:** [April 3, 2020, 11:23pm UTC](https://forums.kodeco.com/t/v6-chapter-5-cell-not-updating-when-moving-positions/103950 "2020-04-03T23:23:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cajeme](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/cajeme/32/81494_2.png) [@cajeme](https://forums.kodeco.com/u/cajeme)\
**Post date:** [April 3, 2020, 11:23pm UTC](https://forums.kodeco.com/t/v6-chapter-5-cell-not-updating-when-moving-positions/103950/1 "2020-04-03T23:23:43Z")

</div>

At the end of chapter we work with Diffable data sources, and whenever the wins cause the cell to move up in position, it doesn’t update the Wins number nor does it deselect the cell (even if i’ve explicitly wrote it to). This only happens in the case that a cell is moving up in position, otherwise the cell updates the number of wins/deselects successfully. Why is this happening?

---

<div class="post-metadata">

**Author:** ![cajeme](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/cajeme/32/81494_2.png) [@cajeme](https://forums.kodeco.com/u/cajeme)\
**Post date:** [April 3, 2020, 11:29pm UTC](https://forums.kodeco.com/t/v6-chapter-5-cell-not-updating-when-moving-positions/103950/2 "2020-04-03T23:29:41Z")

</div>

It looks like in the most recent update they forgot to mention to update the configure method. In the starter project its declaration is

```
func configure(cell: UITableViewCell, for indexPath: IndexPath) {

```

but in the final it’s

```
func configure(cell: UITableViewCell, for team: Team) {

```

The content of the method itself changed as a result too.

---

<div class="post-metadata">

**Author:** ![cajeme](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/cajeme/32/81494_2.png) [@cajeme](https://forums.kodeco.com/u/cajeme)\
**Post date:** [April 3, 2020, 11:31pm UTC](https://forums.kodeco.com/t/v6-chapter-5-cell-not-updating-when-moving-positions/103950/3 "2020-04-03T23:31:43Z")

</div>

Also they incorrectly told us to add

```
let cell = tableView.cellForRow(at: indexPath) as! TeamCell
configure(cell: cell, for: indexPath)

```

at the end of the method tableView(\_ tableView: UITableView, didSelectRowAt, when in their final project, they put it BEFORE saving the context

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [July 4, 2020, 1:35am UTC](https://forums.kodeco.com/t/v6-chapter-5-cell-not-updating-when-moving-positions/103950/4 "2020-07-04T01:35:14Z")

</div>

@cajeme Please check out the latest version of our Core Data book over here:

[https://store.raywenderlich.com/products/core-data-by-tutorials](https://store.raywenderlich.com/products/core-data-by-tutorials)

I hope it helps!

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [September 17, 2020, 3:23pm UTC](https://forums.kodeco.com/t/v6-chapter-5-cell-not-updating-when-moving-positions/103950/5 "2020-09-17T15:23:48Z")

</div>

Closed on September 17, 2020, 3:23pm UTC

This topic was automatically closed after 166 days. New replies are no longer allowed.
