AttachmentGroup
public struct AttachmentGroup
extension AttachmentGroup: View
extension AttachmentGroup: _ViewEmptyChecking
AttachmentGroup is the UI component for adding, removing, and rendering thumbnails and previews.
Usage
AttachmentGroup(
title: { Text("Attachements") },
attachments: self.$attachments,
maxCount: 5,
delegate: self.delegate,
errorMessage: self.$attachmentError,
operations: {
AttachmentButtonImage()
.operationsMenu {
PhotosPickerMenuItem(filter: [.images])
FilesPickerMenuItem(filter: [.pdf, .presentation])
}
}
)
-
init(title:attachments: maxCount: delegate: controlState: errorMessage: operations: onPreview: componentIdentifier: ) Undocumented
Declaration
Swift
public init(@ViewBuilder title: () -> any View, attachments: Binding<[URL]>, maxCount: Int? = nil, delegate: AttachmentDelegate = BasicAttachmentDelegate(), controlState: ControlState = .normal, errorMessage: Binding<AttributedString?> = .constant(nil), @ViewBuilder operations: () -> any View = { EmptyView() }, onPreview: ((URL) -> Void)? = nil, componentIdentifier: String? = AttachmentGroup.identifier) -
Undocumented
Declaration
Swift
static let identifier: String -
init(title:mandatoryFieldIndicator: isRequired: attachments: maxCount: delegate: controlState: errorMessage: operations: onPreview: ) Undocumented
Declaration
Swift
init(title: AttributedString, mandatoryFieldIndicator: TextOrIcon? = .text("*"), isRequired: Bool = false, attachments: Binding<[URL]>, maxCount: Int? = nil, delegate: AttachmentDelegate = BasicAttachmentDelegate(), controlState: ControlState = .normal, errorMessage: Binding<AttributedString?>, @ViewBuilder operations: () -> any View = { EmptyView() }, onPreview: ((URL) -> Void)? = nil) -
Undocumented
Declaration
Swift
init(_ configuration: AttachmentGroupConfiguration) -
Declaration
Swift
@MainActor public var body: some View { get } -
Undocumented
Declaration
Swift
public var isEmpty: Bool { get }