|
Similar in behaviour to the navigationTitle, I woul like the category names e.g. "Data #1" to remain at the top of the screen, untul the next category in the ScrollView meets to replace it (similar to the date label grouping chat messages in WhatsApp will change as the next group scrolls up).
As close as possible to the default behaviour of the navigationTitle, that will appear in the top centre title bar would be my goal. |
|
Use this init for LazyVGrid instead with pinnedViews:
is this what you are trying to achieve? |
|
Yes ! However, I would preffer the text to be backed by a white margin at the top, so the cells do not touch the title. How do I achieve this please ? |
|
As possible solution change your section header to this.
|
|
Thank you very much once again ! This helps a lot with the effect: .statusBar(hidden: true) |
|
Great to hear you solved it! If you have any further questions or need assistance with anything else, feel free to ask! |
SPONSORED Superwall lets you build & test paywalls without shipping updates. Run experiments, offer sales, segment users, update locked features and more at the click of button. Best part? It's FREE for up to 250 conversions / mo and the Superwall team builds out 100% custom paywalls – free of charge.
Sponsor Hacking with Swift and reach the world's largest Swift community!
You need to create an account or log in to reply.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.