SkeletonView icon indicating copy to clipboard operation
SkeletonView copied to clipboard

UITableView subviewsToSkeleton is empty when tableview is not showing in screen.

Open SunZhiC opened this issue 3 years ago • 0 comments

Description

I have a page view, it has two child view, a tableView and a collectionView, both of then are isSkeletonable. when I call show skeletionView in tableview, then scroll to collectionView, then call hide skeletionView, collectionView works fine, skeletionView is disappeared, but when I scroll back to tableView, tableView cell's skeletionView is showing. In SubviewsSkeletonables.swift, I see tableView extension, why you check this window != nil when return subviewsToSkeleton? When tableView is not showing in screen, it's subviews' window is nil, its the bug reason. Why you didn't check window != nil in UICollectionView extension? I'm not sure it is a bug or a discussion.

Can you parse why you want to check window != nil separately in UITableView extension.

What type of issue is this? (place an x in one of the [ ])

  • [ ] bug
  • [ ] enhancement (feature request)
  • [ ] question
  • [ ] documentation related
  • [x] discussion

Requirements (place an x in each of the [ ])

  • [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • [x] I've read and agree to the Code of Conduct.
  • [x] I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

SkeletonView Environment:

**SkeletonView version:**1.30.4 **Xcode version:**13.3.1 **Swift version:**5.6.1

Steps to reproduce:

1.Show tableView in screen and call show skeletionView. 2.Scroll to next page then call hide skeletionView. 3.Scroll back to tableView, this skeletionView is still showing.

Expected result:

TableView's skeletionView should hide.

Actual result:

TableView's skeletionView is still showing.

Attachments:

Logs, screenshots, sample project, funny gif, etc.

SunZhiC avatar Dec 30 '22 02:12 SunZhiC