Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
[ad_1]
Let me know if this can be a duplicate query.
I’m growing an app with a photograph picker. I’m on view A and there’s a + button on it. Once I faucet on the +, I need to navigate to a view B. Upon navigation I need to current a Picture Picker view mechanically inside view B. I’m not ready to determine how to try this presentation of the sheet in Swiftui.
In UIKit,on the viewdidappear of viewcontroller B, i might current the Pickerview.
Here is the code that I’ve
```import SwiftUI
struct ViewB: View {
@State personal var showingImagePicker = false
@State personal var uploadedPhotos = [UIImage]()
var physique: some View {
VStack {
Button("Choose Picture") {
showingImagePicker = true
}
}
.sheet(isPresented: $showingImagePicker) {
PhotoPicker(photoList: $uploadedPhotos)
}
.onChange(of: uploadedPhotos) { _ in
}
}
}```
This code is ViewB and I’ll current the pickerView on tapping a button in viewB. however I do not need to faucet on button however as an alternative need the picker to indicate up on seem of ViewB
[ad_2]