One Logo Pool Ball
SwiftUI · IOS API REFERENCE

DisclosureTableRow

struct · iOS 17.0+ · SDK 27.1

nonisolated struct DisclosureTableRow<Label, Content> where Label : TableRowContent, Content : TableRowContent, Label.TableRowValue == Content.TableRowValue

A kind of table row that shows or hides additional rows based on the state of a disclosure control. A disclosure group row consists of a label row that is always visible, and some content rows that are conditionally visible depending on the state. Toggling the control will flip the state between "expanded" and "collapsed". In the following example, a disclosure group has `allDevices` as the label row, and exposes its expanded state with the bound property, `expanded`. Upon toggling the disclosure control, the user can update the expanded state which will in turn show or hide the three content rows for `iPhone`, `iPad`, and `Mac`. private struct DeviceStats: Identifiable { // ... } @State private var expanded: Bool = true @State private var allDevices: DeviceStats = /* ... */ @State private var iPhone: DeviceStats = /* ... */ @State private var iPad: DeviceStats = /* ... */ @State private var Mac: DeviceStats = /* ... */ var body: some View { Table(of: DeviceStats.self) { // ... } rows: { DisclosureTableRow(allDevices, isExpanded: $expanded) { TableRow(iPhone) TableRow(iPad) TableRow(Mac) } } }

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

DisclosureTableRow.init(_:isExpanded:content:)

This declaration needs Swift generic type arguments. (no canonical witness for Content)

DisclosureTableRow.tableRowBody

This protocol needs associated types that cannot yet cross the bridge.

All SwiftUI types →