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

SOLVED: Project 11 question

Forums > 100 Days of SwiftUI

Hi there,

In the project 11, when i go in detail view it shows for one book "<Back" in the top left but for the other books it shows "<Bookworm". Can someone explain me why ?

Thank you :)

1      

Because of the length of the title. The navbar button will show the name of the previous screen unless there isn't enough room for it, in which case it will just show "Back". And if the title gets really long, the back button will just show the arrow.

3      

Ok, thank you very much for the help :)

Is there a way to force the "<Back" and not the name of the app?

1      

It's not the name of the app, it's the name of the previous page.

To force it to be different, you could play around with the info given in this blog post: Custom Back buttons in SwiftUI | Matthew's Dev Blog

2      

Thank you very much Rossterboy :)

1      

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.