Post

Replies

Boosts

Views

Activity

Reply to Swift Charts - weak scrolling performance
Late response. I am also experiencing this, where I try to plot scientific data with thousands of points. Intitial drawing of a plot is slow, after that it is a tad better. Two things I have found: .chartXScale and .chartXVisibleDomain don't work well together, and I got rid of .chartXScale. Setting a really high initial value for .chartXVisibleDomain improved the lagging. But it still lags. Seems like the framework is not really intended for large data sets.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’25
Reply to NavigationLink selection in DisclosureGroup not working with .draggable modifier
I found a solution, I moved the .draggable modifier to the Label of the DisclosureGroup: struct FolderRow: View { @Environment(\.modelContext) private var context var folder: Folder @State private var isExpanded: Bool = true var body: some View { DisclosureGroup(isExpanded: $isExpanded) { // Subfolders ForEach(folder.subfolders) { subfolder in FolderRow(folder: subfolder) } // Entries (leaf nodes) ForEach(folder.entries) { entry in NavigationLink(destination: EntryDetail(entry: entry)) { EntryRow(entry: entry) } .draggable(entry.name) } } label: { Label(folder.name, systemImage: "folder") .draggable(folder.name) // <<<==== MOVE TO HERE } .dropDestination(for: String.self) { names, _ in return handleDrop(of: names) } } }
Topic: UI Frameworks SubTopic: SwiftUI
Mar ’26
Reply to Swift Charts - weak scrolling performance
Late response. I am also experiencing this, where I try to plot scientific data with thousands of points. Intitial drawing of a plot is slow, after that it is a tad better. Two things I have found: .chartXScale and .chartXVisibleDomain don't work well together, and I got rid of .chartXScale. Setting a really high initial value for .chartXVisibleDomain improved the lagging. But it still lags. Seems like the framework is not really intended for large data sets.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’25
Reply to NavigationLink selection in DisclosureGroup not working with .draggable modifier
I found a solution, I moved the .draggable modifier to the Label of the DisclosureGroup: struct FolderRow: View { @Environment(\.modelContext) private var context var folder: Folder @State private var isExpanded: Bool = true var body: some View { DisclosureGroup(isExpanded: $isExpanded) { // Subfolders ForEach(folder.subfolders) { subfolder in FolderRow(folder: subfolder) } // Entries (leaf nodes) ForEach(folder.entries) { entry in NavigationLink(destination: EntryDetail(entry: entry)) { EntryRow(entry: entry) } .draggable(entry.name) } } label: { Label(folder.name, systemImage: "folder") .draggable(folder.name) // <<<==== MOVE TO HERE } .dropDestination(for: String.self) { names, _ in return handleDrop(of: names) } } }
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Mar ’26