Skeletonview: HideSkeleton doesn't hide all tableView cells

Created on 25 Jun 2020  路  10Comments  路  Source: Juanpe/SkeletonView

What did you do?

I have this code that makes an API call and hides the skeleton view inside reloadUI

// all this inside viewDidLoad 猬囷笍

view.showAnimatedSkeleton()

homeViewModel.getData { [weak self] _ in
      self?.reloadUI()
 }

My reloadUI method

fileprivate func reloadUI() {
        DispatchQueue.main.async {
            self.shouldAnimateSkeleton = false
            self.view.hideSkeleton()
            self.tableView.reloadData()
        }
    }

What did you expect to happen?

All cells should be hiding

What happened instead?

Instead, just some cells hid.
Actually all the views you are looking at, are cells (where view.hideSkeleton() worked). The first one, the account one, the ranking one, the one with the dog.
Simulator Screen Shot - iPhone 8 - 2020-06-25 at 11 32 01

SkeletonView Environment

SkeletonView version:
1.8.7
Xcode version:
11.5
Swift version:
5.2

investigating

Most helpful comment

Hi guys. Investigating

All 10 comments

For my case, after reloading data, random skeletonView in random indexPath still shown

Do not use same reuseId with skeleton cell.

+1

Hi guys. Investigating

Started facing the same issue, after updating to latest version of Xcode.

can you say something more?
Very grateful for that.

Do not use same reuseId with skeleton cell.

It solved my problem.
Thanks!

Do not use same reuseId with skeleton cell.

Hi Every One! What is this mean?

I create another cell for skeleton to show the animation.
I guess it is what he said and it works well for now.

I call "cell.hideSkeleton()" before set data to the cell.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adelbios picture adelbios  路  4Comments

mohpor picture mohpor  路  6Comments

macistador picture macistador  路  6Comments

raphaklr picture raphaklr  路  5Comments

Manikandan271192 picture Manikandan271192  路  4Comments