Post

Replies

Boosts

Views

Activity

Reply to navigationTitle Scroll Behavior Fails when NavigationSplitView has Overlay or ZStack
A workaround—stumbled across it and have no idea why it'd work (but it does): NavigationSplitView { ZStack { NoteListView(notes: notes, selection: $selection) // Workaround for https://developer.apple.com/forums/thread/738313 // Needs to be > 110? .padding(.top, -120) .padding(.top, 120) // Prevent notes from being covered by input .padding(.bottom, 100) NoteInputView(scrollProxy: scrollProxy) .frame(maxHeight: .infinity, alignment: .bottom) } .navigationTitle(Text("Notes")) } The padding needs to be sufficiently large for it to work on all iOS devices, e.g. -1 & +1 won't work. Roughly seems to correspond to the space that the expanded toolbar (e.g. large title) occupies.
Sep ’23