Top navigation bar jumps (wrong animation) in SwiftUI

To reproduce this bug:

  1. Set the .large navigation title in a View (which is in a NavigationView)
  2. Add the .searchable modifier
  3. And add the .refreshable modifier over a scroll view for example
  4. Drag the pull to refresh

Actual result:

  • The navigation bar is blinking and jumping to the top without smooth animation

Expected result:

  • Navigation bar behaves expectedly as usual

I noticed if we use the .inline navigation title style or remove the .searchable modifier it work correctly

Hi!

I noticed that you mentioned you're using a NavigationView. If you're able to support iOS 16 and later, you should use NavigationStack. This behavior doesn't occur with NavigationStack.

Top navigation bar jumps (wrong animation) in SwiftUI
 
 
Q