ListWithInsetGroupedStyleType
@MainActor
public struct ListWithInsetGroupedStyleType : IntrospectableViewType
An abstract representation of the List
type in SwiftUI, with .insetGrouped
style.
struct ContentView: View {
var body: some View {
List {
Text("Item 1")
Text("Item 2")
Text("Item 3")
}
.listStyle(.insetGrouped)
.introspect(.list(style: .insetGrouped), on: .iOS(.v15Earlier14)) {
print(type(of: $0)) // UITableView
}
.introspect(.list(style: .insetGrouped), on: .iOS(.v16Later)) {
print(type(of: $0)) // UICollectionView
}
}
}