I’m attempting to make a view whose header part seems similar to the one used within the App Retailer’s search tab however I’m unable to take action. I am unable to use .navigationTitle as a result of it scrolls because the person scrolls and likewise collapses into an inline view. I discover that Apple makes use of the identical search bar that comes with the .searchable modifier. However I’m misplaced as to how they make the title and profile icon keep in place because the person is scrolling. I’ve tried utilizing .toolbarTitleDisplayMode(.inlineLarge) however that also collapses the title into an inline view when the person begins scrolling. I additionally tried placing the title textual content above the scroll view however the .searchable modifier robotically strikes that textual content beneath the search bar.
I imply I may make a customized one(utilizing .safeAreaBar(edge:content material:) for the fade) and its in all probability simpler however I simply wished to ask if there’s a native/hacky manner of attaining that look. I would like the title and the profile icon and the search bar to be precisely as it’s within the App Retailer’s search tab. I’ve hooked up photos of the three completely different levels to point out what I imply. Is there a local or hacky manner of acheiving this or is it greatest to simply implement my very own?
Photographs:




