Instance Method

itemTitle(for:)

Asks the delegate for the title to display on the invitation screen.

Required.

Declaration

func itemTitle(for csc: UICloudSharingController) -> String?

Discussion

Implement this method to provide a meaningful title to the UICloudSharingController invitation screen.

itemTitle(for:) is called only when creating a new share. For an existing share, the title is retrieved from the share using the CKShare_SystemFieldKey_title key, which is set when a new share is saved.

Listing 1

Tell the controller the item title.

func itemTitle(for csc: UICloudSharingController) -> String? {
  return "Untitled"
}

See Also

Configuring the View Controller

func itemType(for: UICloudSharingController) -> String?

Asks the delegate for the Uniform Type Identifier (UTI) of the item.

func itemThumbnailData(for: UICloudSharingController) -> Data?

Asks the delegate for the thumbnail image data to display on the invitation.