The types of content that the view supports importing. An empty array means the view does not currently support importing.
Instance Method
インスタンスメソッド
imports
importsItemProviders(_:onImport:)
Enables importing item providers from services, such as Continuity Camera on macOS.
Availability 有効性
- macOS 12.0+
Technology
- Swift
UI
Declaration 宣言
func importsItemProviders(_ contentTypes: [UTType
], onImport: @escaping ([NSItemProvider
]) -> Bool
) -> some View
Parameters パラメータ
contentTypes
onImport
A closure that will be called with the imported service item. Return
false
to indicate that there was a failure to receive the items.