Skip to content

SkeletonView does not work with resizable UITableViewCells #40

@theblixguy

Description

@theblixguy

⚠️ Please fill out this template when filing an issue.

What did you do?

  • Import import SkeletonView
  • Conform to SkeletonTableViewDataSource (aka class MyTabViewController : UIViewController, SkeletonTableViewDataSource, UITableViewDelegate { ... })
  • Set myTableView.isSkeletonable = true in viewDidLoad()
  • Set myTableView.rowHeight = UITableViewAutomaticDimension and myTableView.estimatedRowHeight = 414 as I am using a custom UITableViewCell with a UIView in it, containing three UILabels (one multiline, two single line)
  • Return cell identifier in func collectionSkeletonView(_ skeletonView: UITableView, cellIdenfierForRowAt indexPath: IndexPath) -> ReusableCellIdentifier { ... }
  • Call myTableView.showAnimatedSkeleton() before loading data to be displayed, and myTableView.hideSkeleton() after data has been received and myTableView.reloadData() has been called

What did you expect to happen?

The UITableView will show the animated skeleton and then the skeleton will disappear once the data has been loaded

What happened instead?

The UITableView shows a grey background, and the skeleton does not show. After calling myTableView.hideSkeleton(), the every loaded cell's height changes to the value provided inestimatedRowHeight instead of being dynamic.

SkeletonView Environment

SkeletonView version: 1.1
Xcode version: 9.2 (9C40b)
Swift version: 4.0

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions