Juanpe / SkeletonView

☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
MIT License
12.62k stars 1.12k forks source link

Fix HideSkeleton() does not apply transition within a UITableView #469 #484

Closed JacksonJang closed 2 years ago

JacksonJang commented 2 years ago

Summary

Describe the goal of this PR. Mention any related Issue numbers. issue Number : #469

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

JacksonJang commented 2 years ago

I found the problem and solved but I don't know why working..? anyway, I think that the issue exist from "dataSource" and "reloadData()". It's hard for me to solve the problem. if you need to help, I can help you continuously!!

[UITableView+CollectionSkeleton.swift]

func removeDummyDataSource(reloadAfter: Bool) {
        /*
        guard let dataSource = self.dataSource as? SkeletonCollectionDataSource else { return }
        restoreRowHeight()
        self.skeletonDataSource = nil
        self.dataSource = dataSource.originalTableViewDataSource
        */
        if let delegate = self.delegate as? SkeletonCollectionDelegate {
            self.skeletonDelegate = nil
            self.delegate = delegate.originalTableViewDelegate
        }

        //if reloadAfter { self.reloadData() }
}