Posts

Post not yet marked as solved
1 Replies
860 Views
It seems that the modifier func suggestedFileName(_ fileName: String) -> some TransferRepresentation can only set the filename for the entire Transferable type. What I want is to set the filename for each instance. Every instance of a Transferable type shouldn't have the same filename. static var transferRepresentation: some TransferRepresentation { FileRepresentation(exportedContentType: .myType) { myTransferable in         let url = try await myTransferable.exportedFileUrl()         return SentTransferredFile(url) /* maybe set the specific filename on SentTransferredFile? */     } .suggestedFileName("Unnamed") // maybe this should be a fallback filename }
Posted
by szquest.
Last updated
.
Post not yet marked as solved
0 Replies
345 Views
The second HStack's content cannot be correctly aligned. Is this a SwiftUI's bug? Text("Alignment with VStack") HStack(alignment: .firstTextBaseline) { Text("·") VStack { Text("LARGE TITLE") Text("LARGE TITLE") } .font(.largeTitle) } Divider() Text("Alignment with Lazy VStack") HStack(alignment: .firstTextBaseline) { Text("·") LazyVStack { Text("LARGE TITLE") Text("LARGE TITLE") } .font(.largeTitle) }
Posted
by szquest.
Last updated
.