Search code examples
iosswiftuiimagepickercontrollerphoto-gallery

can I open PhotoGallery using 'DKImagePickerController' in swift


I want to open PhotoGallery in iPad using 'DKImagePickerController', is it possible??

I have tried to open gallery using UIImagePickerController and its work fine but i have only one option(popoverPresentationController) to open Gallery and its seems small screen to select photo.

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

I want to open only PhotoGallery in landscape mode.


Solution

  • let pickerController = DKImagePickerController()
    
     pickerController.didSelectAssets = { (assets: [DKAsset]) in
    print("didSelectAssets")
    print(assets)
    }
    
    self.presentViewController(pickerController, animated: true)
    

    use this code to open the camera