I’m experiencing a UI flickering issue in a SwiftUI application related to navigation and the .searchable modifier. I have the following navigation flow:
Case 1:
Event Dashboard ↓ Attendee List ↓ Back to Event Dashboard
The Event Dashboard contains an event image at the top. The Attendee List has a navigation bar with a .searchable search field.
When I navigate back from the Attendee List to the Event Dashboard, the event image briefly becomes smaller and then returns to its original size after approximately one second.
Case 2:
Event Dashboard ↓ Attendee List ↓ Attendee Detail
The Attendee List contains .searchable, while the Attendee Detail screen does not.
When navigating from the Attendee List to the Attendee Detail screen, the attendee profile image similarly becomes slightly smaller and then enlarges back to its original size.
The behavior appears to be related to the navigation bar/search bar layout changing between screens.
For example, the Attendee List currently uses:
.searchable( text: $model.searchQuery, placement: .navigationBarDrawer, prompt: "Search" )
If I completely remove .searchable from the Attendee List, the flickering does not occur.
I would like to understand whether this is expected SwiftUI behavior or a known issue with .searchable and navigation transitions.
I am considering testing the Attendee List with ScrollView + LazyVStack instead of List to determine whether List is contributing to the issue.
Hello @hitarth2000,
Thank you for this detailed report.
Can you attach the sample project used in testing? I want to make sure we are seeing the same result after following the steps to reproduce.
Include relevant screen recordings, logs and software/hardware versions used in testing along with your report.
Attach all of this in a feedback report filed through Feedback Assistant
Updates will be provided to you through Feedback Assistant. There, you can track if the report is still being investigated, has a potential identified fix, or has been resolved in another way.
For more details on Feedback Status, please see “Understanding the Status of Your Feedback” linked here: https://developer.apple.com/bug-reporting/status
Thank you,
Travis