UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

SOLVED: Space around navigation view content when using a navigation bar item

Forums > SwiftUI

Hi out there!

When using a navigation view there is a difference in the spacing around the content when using navigation bar items. This only occurs on the root view, not the subsequent views when a navigation link is click. Any thoughts?

https://ibb.co/FWqD1R4

https://ibb.co/Dw6G9gP

2      

It to do with the .listStyle(_:)

So add modiflier to your list

.listStyle(PlainListStyle())

You can check the Apple Developer Documenation - ListStyle for all of them. (ps some only work on some platforms)

2      

Hacking with Swift is sponsored by RevenueCat.

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.