Post

Replies

Boosts

Views

Activity

Reply to Significant scrolling lag when using .focused modifier in large LazyVStack/LazyHStack on tvOS
Would love to get some feedback from any of the Apple engineers about it, the behavior is the same in tvOS26 Developer Beta 1 as well, having a LazyVStack with 700+ rows with each row using the .focused modifier will lag the ScrollView to almost 1 FPS when getting to position 500+- It seems as SwiftUI keeps rendering all the previous scrolled rows which causes major lag. Removing the .focused modifier completely fixes it, as this modifier is a key modifier for creating a complex apps in tvOS I would assume it would be a top priority to fix.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’25
Reply to NavigationStack inside NavigationSplitView broken animation
@DTS Engineer Below you will find a more detailed code: @State private var selectedItem: String? @State private var navigationPath = NavigationPath() var body: some View { NavigationSplitView { List(selection: $selectedItem) { Button("Item 1") { selectedItem = "Detail View 1" } Button("Item 2") { selectedItem = "Detail View 2" } } } detail: { NavigationStack(path: $navigationPath) { DetailView(navigationPath: $navigationPath) .navigationDestination(for: String.self) { value in VStack { Image(systemName: "photo") Text("New Screen: \(value)") } .frame(maxWidth: .infinity, maxHeight: .infinity) } } } } } struct DetailView: View { @Binding var navigationPath: NavigationPath var body: some View { VStack { Text("Title") .font(.title) Text("Detail view content") .foregroundStyle(.secondary) Button("Change Screen"){ navigationPath.append("Second Screen") } } .frame(maxWidth: .infinity, maxHeight: .infinity) } } While observing navigationPath it did not pop the view of the stack after adding it. @DTS Engineer
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’25