How to fix overlapped navigation titles in SwiftUI

Issue #756

extension NavigationLink {
    func fixOverlap() -> AnyView {
        if UIDevice.current.userInterfaceIdiom == .phone {
            return self.isDetailLink(false).erase()
        } else {
            return self.erase()
        }
    }
}

Read more

As far as I can tell, this bug only shows up if you: 1) have the navigation title displayMode of a destination view set to .large and 2) have added items to the navigation bar using the .navigationBarItems modifier.

Written by

I’m open source contributor, writer, speaker and product maker.

Start the conversation