BLACK FRIDAY SALE: Save big on all my Swift books and bundles! >>

iOS 14 NavigationView .principal overlapping text issue

Forums > SwiftUI

On iOS 14.0 is it possible to prevent the very long text below from overlapping the leading text? Works on iOS 15 as expected. On iOS 14.0 and 14.5 is overlaps. Thanks for any help.

NavigationView {
    Text("Hello, SwiftUI!")
        .toolbar {
            ToolbarItem(placement: .navigationBarLeading) {
            ToolbarItem(placement: .principal) {
                Text("My very long title blah blah blah blah blah blah blah blah")


Hacking with Swift is sponsored by RevenueCat

SPONSORED In-app subscriptions are a pain to implement, hard to test, and full of edge cases. RevenueCat makes it straightforward and reliable so you can get back to building your app. Oh, and it's free if your app makes less than $10k/mo.

Learn more

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

Reply to this topic…

You need to create an account or log in to reply.

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.