To allow the user to download a file, I use the UIActivityViewController provided by Apple. The following code produces the first screenshot:
let url: URL = // some url
let activityViewController = UIActivityViewController(activityItems: [url, "A filename"], applicationActivities: nil)
present(activityViewController, animated: true, completion: nil)
However, it does not show the file type (pdf document) and size, as is shown in the screenshot below. All functions of the activity view work (downloading, mailing, etc).
Does anyone know how this information can be displayed using a UIActivityViewController
?
您可以根据本主题实现功能或尝试为您的共享文件实现activityViewControllerLinkMetadata(_:)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.