Questions tagged [photospicker]

3 questions
1
vote
1 answer

How to cancel loadTransferable(type:)?

I'd like to implement a timeout for loading images from the PhotosPicker in SwiftUI in case there's no internet connection and the images are not available in full resolution on the device yet, for example. I used a task group with a parallel timer…
Sebastian
  • 335
  • 2
  • 10
0
votes
2 answers

How to know when PhotosPicker is presented?

I need to run some code directly when the user invokes the PhotosPicker. I have tried .onAppear and .onTapGesture, but those methods never gets triggered when tapping the button that opens the PhotosPicker-view. PhotosPicker(selection:…
irrbloss
  • 207
  • 2
  • 9
0
votes
2 answers

SwiftUI PhotosPicker - AXRuntimeError and detached view controller warning

I have the following code in a View that I show via a NavigationStack path.push() statement: @State private var avatarItem: PhotosPickerItem? @State private var avatarImage: Image? var body: some View { VStack(alignment: .center) { …
Janene Pappas
  • 1,366
  • 12
  • 26