Search code examples
iosuitableviewuiactivityindicatorview

Activity indicator only spins first time in table cell prototype


I have a "loading" cell prototype with only an activity indicator. First time they're used all five of them spin. Then they get replaced with other cells, and when they reappear later the activity indicator doesn't spin.

The indicator has the "animating" property set in storyboard.

Image

I dequeue the cells in cell for row at index path and if they still don't exist I create a new one from its cell id.

Lack of code due to asking from my phone. But if the answer seems obvious then shoot.


Solution

  • I have the same problem. Fixed it by calling [self.activityIndicator startAnimating] on the cell after I have dequeued it each time.

    It looks like an Apple bug - in theory if the animating property is set on the storyboard, it should stay animating even after being dequeued.