Instance Method インスタンスメソッド

onCutCommand(perform:)

Adds an action to perform in response to the system’s Cut command. システムのもつ「カット」コマンドに答えて実行するアクションを加えます。

Declaration 宣言

func onCutCommand(perform payloadAction: (() -> [NSItemProvider])?) -> some View

Return Value 戻り値

A view that triggers action when a system cut command occurs. あるビュー、それはactionをシステムカットコマンドが発生する時に引き起こすものです。

Parameters パラメータ

payloadAction

An action closure that should delete the selected data and return NSItemProvider items corresponding to that data, which should be written to the pasteboard. If action is nil, the cut command is considered disabled. あるアクションクロージャ、それは選択されたデータを削除しなくてはなりません、そしてペーストボードに書き込まれるべきそのデータに対応しているNSItemProvider項目それらを返さなければなりません。actionnilならば、そのカットコマンドは無効とみなされます。