Bugfix/tableview insetgrouped (#494)
* Fixed TableView skeleton cannot hide if style is insetGrouped * Fixed show skeleton button not visible * Update the fix base on PR comments
This commit is contained in:
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user