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