TableRowContent
protocol · iOS 16.0+ · SDK 27.1
@MainActor @preconcurrency protocol TableRowContent<TableRowValue>A type used to represent table rows. Like with the ``View`` protocol, you can create custom table row content by declaring a type that conforms to the `TableRowContent` protocol and implementing the required ``TableRowContent/tableRowBody-swift.property`` property. struct GroupOfPeopleRows: TableRowContent { @Binding var people: [Person] var tableRowBody: some TableRowContent<Person> { ForEach(people) { person in TableRow(person) .itemProvider { person.itemProvider } } .dropDestination(for: Person.self) { destination, newPeople in people.insert(contentsOf: newPeople, at: destination) } } } This example uses an opaque result type and specifies that the primary associated type `TableRowValue` for the `tableRowBody` property is a `Person`. From this, SwiftUI can infer `TableRowValue` for the `GroupOfPeopleRows` structure is also `Person`. A type conforming to this protocol inherits `@preconcurrency @MainActor` isolation from the protocol if the conformance is included in the type's base declaration: struct MyCustomType: Transition { // `@preconcurrency @MainActor` isolation by default } Isolation to the main actor is the default, but it's not required. Declare the conformance in an extension to opt out of main actor isolation: extension MyCustomType: Transition { // `nonisolated` by default }
Members (0)
This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.
Skipped declarations
6 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
TableRowContent.selectionDisabled(_:)
This protocol needs associated types that cannot yet cross the bridge.
TableRowContent.draggable(_:)
callback cannot propagate synchronous failure
TableRowContent.dropDestination(for:action:)
This protocol needs associated types that cannot yet cross the bridge.
TableRowContent.itemProvider(_:)
callback cannot propagate synchronous failure
TableRowContent.contextMenu(menuItems:)
callback cannot propagate synchronous failure
TableRowContent.contextMenu(menuItems:preview:)
callback cannot propagate synchronous failure