struct OnInsertTableRowModifier
A table row modifier that adds the ability to insert data in some base row content.
Availability 有効性
Technology
func onInsert(of supportedContentTypes: [UTType
], perform action: @escaping (Int
, [NSItemProvider
]) -> Void
) -> ModifiedContent
<Self, OnInsertTableRowModifier
>
A view that calls action
when elements are inserted into the original view.
あるビュー、それは要素が元のビューに挿入される時にaction
を呼び出します。
supportedContentTypes
An array of UTI types that the rows supports.
action
A closure that SwiftUI invokes when elements are added to the collection of rows. The closure takes two arguments: The first argument is the offset relative to the dynamic view’s underlying collection of data.
クロージャは2つの引数をとります:最初の引数は、動的ビューのもつ基礎をなすデータのコレクションに相対的なオフセットです。
The second argument is an array of NSItem
items that represents the data that you want to insert.
struct OnInsertTableRowModifier