Save state for activity indicator in cell

I have an activity indicator in a cell. Updating cells withNSFetchedResultsController

func controller(controller: NSFetchedResultsController, didChangeObject anObject: AnyObject, atIndexPath indexPath: NSIndexPath?, forChangeType type: NSFetchedResultsChangeType, newIndexPath: NSIndexPath?) {
    switch type {
        case .Update:
           if let _indexPath = indexPath {
            self.tableView.reloadRowsAtIndexPaths([_indexPath], withRowAnimation: .None)
           }
    }

My problem is that after the reboot line, the state of the activity indicator is again set to 0, and the animation looks jerky.

enter image description here

Is it possible to somehow save the state of the indicator or not to restart it ...

+4
source share
1 answer

There is no public API to get or set state UIActivityIndicatorViewseparately from animation or hiding. I think you are best off trying reloadRowsAtIndexPathswith some animation of the series to see if it looks better.

, , - UIActivityIndicatorView, . (, ). . .

+1

All Articles