init(items:)
Creates a new sharing service picker for the selected items.
Declaration
init(items: [Any])Parameters
- items:
The items to be shared. The items in the array must conform to the Nspasteboardwriting or Nspreviewrepresentableactivityitem protocol. For example, you can specify an Nsstring, Nsimage, Nsurl, or similar type directly. You can also specify Nsitemprovider or Nsdocument objects in the array to share those types.
Return Value
A configured sharing service picker.
Discussion
If an item is an NSURL object and contains a file URL (pointing to a video on the local disk for example), the picker shares the content of the file. If the URL is remote, then the picker shares the URL instead of the contents.