如何自定义UIDocumentPickerViewController?

时间:2017-11-20 13:20:53

标签: swift3 share uiactionsheet drive uidocumentpickerviewcontroller

我正在使用UIDocumentPickerViewController进行派生(比如Dropbox,google等)。

let importMenu = UIDocumentPickerViewController(documentTypes: [String(kUTTypeContent),String(kUTTypeItem)], in: .import)

    importMenu.delegate = self
    importMenu.modalPresentationStyle = .formSheet
    self.present(importMenu, animated: true, completion: nil)

但是现在我正在尝试自定义UIDocumentPickerViewController。如何在菜单中添加更多选项,如相机,画廊等。

我无法使用以下代码,因为现在不推荐使用UIDocumentMenuViewController

func addOption(withTitle title: String, 
         image: UIImage?, 
         order: UIDocumentMenuOrder, 
       handler: @escaping () -> Void)

还有其他方法可以自定义UIDocumentPickerViewController并在其中添加更多选项。

由于

0 个答案:

没有答案