[SwiftUI] imagePicker 사용기
사진 추가하기 시도해봄 1. ImagePicker.swift import SwiftUI import PhotosUI @MainActor class ImagePicker: ObservableObject { @Published var image: Image? @Published var images: [Image] = [] @Published var imageSelection: PhotosPickerItem? { didSet { if let imageSelection { Task { try await loadTransferable(from: imageSelection) } } } } @Published var imageSelections: [PhotosPickerItem] = [] { didSet { Task..
공부합시다/Swift
2022. 11. 14. 23:50