Skip to content

Commit

Permalink
Bugfix/tableview insetgrouped (#494)
Browse files Browse the repository at this point in the history
* Fixed TableView skeleton cannot hide if style is insetGrouped

* Fixed show skeleton button not visible

* Update the fix base on PR comments
  • Loading branch information
tomcheung authored Aug 16, 2022
1 parent fbc2e6f commit 969f068
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
}
"platform" : "universal",
"reference" : "systemBlueColor"
},
"idiom" : "universal"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,18 @@ extension UITableView {
// Some developer trying to call `view.showAnimatedSkeleton()`
// when the request or data is loading which sometimes happens before the ViewDidAppear
guard window != nil else { return [] }
return subviews

var result = [UIView]()

for subview in subviews {
if String(describing: type(of: subview)) == "UITableViewWrapperView" {
result.append(contentsOf: subview.subviews)
} else {
result.append(subview)
}
}

return result
}

}
Expand Down

0 comments on commit 969f068

Please sign in to comment.