Guest User

Untitled

a guest
Jan 9th, 2023
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.47 KB | Source Code | 0 0
  1. import PhotosUI
  2. import SwiftUI
  3.  
  4. struct ImagePicker: UIViewControllerRepresentable {
  5.     func makeUIViewController(context: Context) -> PHPickerViewController {
  6.         var config = PHPickerConfiguration()
  7.         config.filter = .images
  8.        
  9.         let picker = PHPickerViewController(configuration: config)
  10.         return picker
  11.     }
  12.    
  13.     func updateUIViewController(_ uiViewController: PHPickerViewController, context: Context) {
  14.        
  15.     }
  16.        
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment