Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Image selection not working on MACOS. #71

Open
YogeshPateliOS opened this issue Jan 8, 2022 · 0 comments
Open

Multiple Image selection not working on MACOS. #71

YogeshPateliOS opened this issue Jan 8, 2022 · 0 comments

Comments

@YogeshPateliOS
Copy link

Below code is working fine for iPhone and iPad. How can I achieve same thing in macos?

let imagePicker = OpalImagePickerController()
       self.presentOpalImagePickerController(imagePicker, animated: true,
                                        select: { (assets) in
           self.indicatorView.startAnimating()
           self.dismiss(animated: true) {
               for asset in assets {
                   let model = PhotoModel(
                       creationDate: asset.creationDate ?? Date(),
                       modificationDate: asset.modificationDate ?? Date(),
                       mediaType: asset.getMediaType(),
                       isFavorite: asset.isFavorite,
                       image: asset.getAssetThumbnail().pngData() ?? Data()
                   )
                   
                   DatabaseHelper.shareInstance.savePhoto(model: model)
               }
               
               self.photoArray = DatabaseHelper.shareInstance.getAllPhotos()
           }
           
       }, cancel: {
           //Cancel
           print(#function)
       })
@YogeshPateliOS YogeshPateliOS changed the title Multiple Images selection not working on MACOS. Multiple Image selection not working on MACOS. Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant