我可以使用' DKImagePickerController'打开PhotoGallery吗?在迅速

时间:2017-05-17 09:00:53

标签: ios swift uiimagepickercontroller photo-gallery

我想使用' DKImagePickerController'在iPad上打开PhotoGallery,是否可能?

我尝试使用UIImagePickerController打开图库并且工作正常,但我只有一个选项(popoverPresentationController)来打开图库,它似乎是小屏幕来选择照片。

    let imagePicker = UIImagePickerController()
    imagePicker.modalPresentationStyle = UIModalPresentationStyle.popover

我想在横向模式下只打开PhotoGallery。

1 个答案:

答案 0 :(得分:0)

let pickerController = DKImagePickerController()

 pickerController.didSelectAssets = { (assets: [DKAsset]) in
print("didSelectAssets")
print(assets)
}

self.presentViewController(pickerController, animated: true)

使用此代码打开相机