Open EstebanC02 opened 3 years ago
What you need to do is implement the following methods in your coordinator:
func pickerViewController(_ pickerViewController: TatsiPickerViewController, didPickAssets assets: [PHAsset])
Is what will be called when the done button is pressed, with the assets the user has selected. Here you are also responsible for dismissing the pickerViewController yourself.
Next you also need to implement:
func pickerViewControllerDidCancel(_ pickerViewController: TatsiPickerViewController)
Which is called when the user taps the cancel button, in this case you also have to dismiss the pickerViewController yourself.
Any methods from UINavigationControllerDelegate or UIImagePickerControllerDelegate do not have to be implemented.
I hope this helps you :)
I also tried the same, where I am using the below code. But both cancel and done are not working as expected.
func pickerViewController(_ pickerViewController: TatsiPickerViewController, didPickAssets assets: [PHAsset]) {
parent.isShown.toggle()
}
func pickerViewControllerDidCancel(_ pickerViewController: TatsiPickerViewController) {
pickerViewController.dismiss(animated: true, completion: nil)
parent.isShown.toggle()
}
Hi, I am doing the library integration via SPM to my project in SwiftUI, but I have a problem because the Done at the top of the Tatsi view is not called and I can't get the selected images.
The code for the integration via UIViewControllerRepresentable is as follows:
What do I need to integrate in order to obtain the selected images? Thank you!