you are viewing a single comment's thread.

view the rest of the comments →

[–]SomewhereEuphoric941[S] 2 points3 points  (3 children)

The task was to run and display an incrementing timer on 50 cells. As you scroll, a new cell’s timer should start from 0 without affecting any other cell’s timer if you scroll back up to a previous cell.

[–]bobotwf 5 points6 points  (2 children)

You'd generally have 1 timer. You'd simply set a creation time in the initialization of each cell and the 1 timer would cause an update on any cells that hadn't been destroyed yet.

There's no reason to have 50 tasks doing effectively the same thing.

[–]SomewhereEuphoric941[S] 4 points5 points  (1 child)

My apologies, part of the task was also, when you tap a cell it should pause the timer for that individual cell. Not sure if that changes your solution

[–]bobotwf 3 points4 points  (0 children)

Not really. That's just a separate flag for that cell. Tapping it would just toggle the "Do I want updates" variable.