title: iOS SwiftUI: ScrollView ignore top safe area
body: <p>I have a shared view in my app that can be called in different places.
  The root of this view is a scroll view, but sometimes it ignores the top safe area and it collapses under the navigation bar.</p>
  
  <p>Here two screenshots that shows better the problem:</p>
  
  <p><a href="https://i.stack.imgur.com/u9Gos.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u9Gos.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/Vg6Hg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Vg6Hg.png" alt="enter image description here"></a></p>
  
  <p>As you can see in the second screenshot the scrollview extends for all the screen collapsing under the navigation.
  How can I  avoid this?</p>