mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-25 17:51:01 +00:00
presentationMode -> dismiss
This commit is contained in:
parent
4a09989160
commit
3840b8fb28
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@ import UIKit
|
|||
|
||||
struct StatusEditorCameraPickerView: UIViewControllerRepresentable {
|
||||
@Binding var selectedImage: UIImage?
|
||||
@Environment(\.presentationMode) var isPresented
|
||||
@Environment(\.dismiss) var dismiss
|
||||
|
||||
class Coordinator: NSObject, UINavigationControllerDelegate, UIImagePickerControllerDelegate {
|
||||
let picker: StatusEditorCameraPickerView
|
||||
|
@ -15,7 +15,7 @@ struct StatusEditorCameraPickerView: UIViewControllerRepresentable {
|
|||
func imagePickerController(_: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any]) {
|
||||
guard let selectedImage = info[.originalImage] as? UIImage else { return }
|
||||
picker.selectedImage = selectedImage
|
||||
picker.isPresented.wrappedValue.dismiss()
|
||||
picker.dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue