Post

Replies

Boosts

Views

Activity

How to copy List items within Navigation
I am currently working on a SwiftUI project and encountering an issue with the .copyable(_:) modifier. I want to copy the currently selected items in a List, and while using .copyable(_:) works outside of navigation components, it doesn't seem to have any effect when used within NavigationSplitView or NavigationStack. Has anyone successfully implemented copying functionality within a navigation structure using .copyable(_:)? import SwiftUI struct ContentView: View { var body: some View { NavigationSplitView { List(0..<10) { Text("row \($0)") } } detail: { CopyableList() } } } struct CopyableList: View { let strings = ["Alpha", "Beta", "Gamma"] @State private var selection: Set<String> = [] var body: some View { List(strings, id: \.self, selection: $selection) { Text($0) } .copyable(Array(selection)) } }
1
0
621
Dec ’23
Why was NSAttributedString.Key.verticalGlyphForm Deprecated in macOS 14, and How to Handle Vertical Text Now?
In macOS 14, NSAttributedString.Key.verticalGlyphForm has been deprecated. This key was previously used for rendering text vertically, particularly in languages like Chinese, Japanese, and Korean. I'm curious about the reasons behind its deprecation and would appreciate insights into alternative methods for displaying vertical text.
2
1
765
Oct ’23