Search code examples
swiftfrontendswiftuimobile-application

How to ignore area after make navigatiobar hidden swiftUI?


I tried to remove my navigation bar but how can adjust the content so it move up and not hide by the Tab bar?

I tried to use edgesIgnoringSafeArea(.top) but the content just moved up too much enter image description here


Solution

  • Did you tried to play with '.offset()' modifier?

    .edgesIgnoringSafeArea(.top)
    .offset(y: <#Value#>)
    

    If it wont help, try to apply those modifiers for more 'parent' view,

    if it also wont help, try to play with order of modifiers, it can do the trick in particular cases