Closed HolyPaPa99 closed 1 year ago
Same, it's not work(
I have the same issue as described above. Any updates?
Hi, sorry for the late reply, we didn't have much time in the past few weeks.
Could you try using .introspectTableView
inside of the List? We're still looking into weird edge cases where our discovery methods don't do a good job at finding the target component.
I did try to use . introspectTableView
inside of the List but the result is the same. However, I can change the .backgroundColor
property but other properties such as .separatorStyle
or .separatorInset
are not working.
Plus, the changes added to UITableViewCell apply to visible cells only and are reset when cells go outside of the visible scope.
https://user-images.githubusercontent.com/8677849/119967053-43573180-bfac-11eb-91fd-9d06649625c2.mov https://user-images.githubusercontent.com/8677849/119966753-eb202f80-bfab-11eb-944a-5380d9253c2d.mov
Hi, guys. The SwiftUI 3.0 supports more features for List, including listRowSeparator modifier. wait for xcode 13 release or use xcode 13 beta
Any update on this?
It appears this doesn't work on iOS 14 because iOS 14 doesn't use a table view for Lists. iOS 15 and iOS 13 both do use tableviews I believe.
Is there any progress about this bug?
the changes added to UITableViewCell apply to visible cells only and are reset when cells go outside of the visible scope.
A little late to this, but the new SwiftUIIntrospect module's API accounts for differences between OSes:
import SwiftUI
import SwiftUIIntrospect
struct ContentView: View {
var body: some View {
List {
Text("Item")
.introspect(.listCell, on: .iOS(.v13, .v14, .v15)) { tableViewCell in
print(type(of: tableViewCell)) // UITableViewCell
}
.introspect(.listCell, on: .iOS(.v16, .v17)) { collectionViewCell in
print(type(of: collectionViewCell)) // UICollectionViewCell
}
}
.introspect(.list, on: .iOS(.v13, .v14, .v15)) { tableView in
print(type(of: tableView)) // UITableView
}
.introspect(.list, on: .iOS(.v16, .v17)) { collectionView in
print(type(of: collectionView)) // UICollectionView
}
}
}
Closing, but feel free to ask any follow up questions.