Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import PhotosUI
- import SwiftUI
- struct ImagePicker: UIViewControllerRepresentable {
- func makeUIViewController(context: Context) -> PHPickerViewController {
- var config = PHPickerConfiguration()
- config.filter = .images
- let picker = PHPickerViewController(configuration: config)
- return picker
- }
- func updateUIViewController(_ uiViewController: PHPickerViewController, context: Context) {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment