-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
What did you do?
- Import
import SkeletonView - Conform to
SkeletonTableViewDataSource(akaclass MyTabViewController : UIViewController, SkeletonTableViewDataSource, UITableViewDelegate { ... }) - Set
myTableView.isSkeletonable = trueinviewDidLoad() - Set
myTableView.rowHeight = UITableViewAutomaticDimensionandmyTableView.estimatedRowHeight = 414as I am using a customUITableViewCellwith aUIViewin it, containing threeUILabels (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, andmyTableView.hideSkeleton()after data has been received andmyTableView.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