Skip to content

Commit

Permalink
⚡️ :: 이미지 픽커 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
BJCHO0501 committed Aug 29, 2023
1 parent 64cdf97 commit c20c143
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ struct SDPhotoPickerModifier: ViewModifier {
self.isPresented = isPresented
self.singleSelection = selection
self.multipleSelection = nil
self.isError = errorAction
}

init(isPresented: Binding<Bool>, selection: Binding<[UIImage]>, errorAction: (() -> Void)?) {
self.isPresented = isPresented
self.singleSelection = nil
self.multipleSelection = selection
self.isError = errorAction
}

func body(content: Content) -> some View {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import SwiftUI

public extension View {
func sdPhotoPicker(isPresented: Binding<Bool>, selection: Binding<[UIImage]>, errorAction: (() -> Void)?) -> some View {
func sdPhotoPicker(isPresented: Binding<Bool>, selection: Binding<[UIImage]>, errorAction: (() -> Void)? = nil) -> some View {
self.modifier(SDPhotoPickerModifier(
isPresented: isPresented,
selection: selection,
errorAction: errorAction
))
}
func sdPhotoPicker(isPresented: Binding<Bool>, selection: Binding<UIImage>, errorAction: (() -> Void)?) -> some View {
func sdPhotoPicker(isPresented: Binding<Bool>, selection: Binding<UIImage>, errorAction: (() -> Void)? = nil) -> some View {
self.modifier(SDPhotoPickerModifier(
isPresented: isPresented,
selection: selection,
Expand Down

0 comments on commit c20c143

Please sign in to comment.