ListType
public struct ListType : IntrospectableViewType
An abstract representation of the List
type in SwiftUI.
struct ContentView: View {
var body: some View {
List {
Text("Item 1")
Text("Item 2")
Text("Item 3")
}
.introspect(.list, on: .iOS(.v13, .v14, .v15)) {
print(type(of: $0)) // UITableView
}
.introspect(.list, on: .iOS(.v16, .v17)) {
print(type(of: $0)) // UICollectionView
}
}
}