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)
}
Post
Replies
Boosts
Views
Activity
The scene(_:openURLContexts:) in UISceneDelegate called by iOS only with the first shared file URL in its's URLContexts: Set<UIOpenURLContext> parameter.
How can I get the full file URLs shared from other app?
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
}