|
Hi all, I'm walking through Day 30, Part 2 "Running code when our app launches", and unlike what the instruction says, I do not see a random eight-letter word at the top of the navigation view. Does it happen because .navigationTitle(rootWord) is not working, or onAppear() is not working? Here is my code. I have followed every step and couldn't see where went wrong.
|
|
|
|
|
|
That way, each It also makes it easy for the back button to display the title of the previous |
|
I will try to explain but think Paul says better in one of his video (not sure which one) The Navigation Title belongs to the view inside the
i have just seen @roosterboy has also explained as well hopefully you have a better understanding |
|
Thank you both, very helpful. When I work through projects, I like to read the text instead of watching Paul's video. Do you think the video is superior? I remember Paul wrote at the beginning of the 100 day course that there is a content equivalency between those two. |
|
I'm having this same problem, but the solution isn't working for me. I was able to confirm that "allWords" is being populated with the word list and a random word is being assigned to "rootWord." Despite this, the navigation title isn't showing up. I can get a placeholder title to show up, for example .navigationTitle("Title") works.
|
|
Having the same issue as above. And judging by the date of the post, something may have changed recently in terms of modifying the value of I've found out though that if you initialise the @State var to the default value shown in the course ("silkworm"), or any other, really, then it works fine. For example:
However, if it's empty, then it does not show. I have also checked printing the value of the |
SAVE 50% All our books and bundles are half price for Black Friday, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.
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.
Link copied to your pasteboard.