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      

BUILD THE ULTIMATE PORTFOLIO APP Most Swift tutorials help you solve one specific problem, but in my Ultimate Portfolio App series I show you how to get all the best practices into a single app: architecture, testing, performance, accessibility, localization, project organization, and so much more, all while building a SwiftUI app that works on iOS, macOS and watchOS.

Get it on Hacking with Swift+

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.