Attachment
Attachment
is the UI component to be used by AttachmentGroup
along with AttachmentButtonImage
to support users’ operation, such as adding a photo or a file and to render attachment list.
Usage
Attachment {
AttachmentThumbnail(url: fileURL)
} attachmentTitle: {
Text("Leaf")
} attachmentSubtitle: {
Text("15MB")
} attachmentFootnote: {
Text("Aug 15, 2024")
}
Attachment {
Image(systemName: "leaf")
.resizable()
} attachmentTitle: {
Text("Leaf")
} attachmentSubtitle: {
Text("15MB")
} attachmentFootnote: {
Text("Aug 15, 2024")
}
-
Undocumented
Declaration
Swift
public init(@ViewBuilder attachmentTitle: () -> any View, @ViewBuilder attachmentSubtitle: () -> any View, @ViewBuilder attachmentFootnote: () -> any View, url: URL, controlState: ControlState = .normal, componentIdentifier: String? = Attachment.identifier)
-
Undocumented
Declaration
Swift
static let identifier: String
-
Undocumented
Declaration
Swift
init(attachmentTitle: AttributedString, attachmentSubtitle: AttributedString, attachmentFootnote: AttributedString, url: URL, controlState: ControlState = .normal)
-
Undocumented
Declaration
Swift
init(_ configuration: AttachmentConfiguration)
-
Declaration
Swift
@MainActor public var body: some View { get }
-
Undocumented
Declaration
Swift
public var isEmpty: Bool { get }