Group Group Group Group Group Group Group Group Group

Chapter 13 Strange Navigation Title Behavior

I just completed the chapter 13 of the book. When I run the app, the navigation title have a strange behavior. Sometimes it gets stuck in the top bar and other times in large title mode. Can anyone know how to solve?. I tried to run the final project and the same thing happens.

hi Gaspare, what version of Xcode are you using? macOS?

I see a slight hiccup when the list appears: at first it’s one cell lower, then it quickly moves up to close the gap. But the title always looks the same, and I don’t get any overlap or really big gap like your screenshot.

Try restarting Xcode, or restarting your Mac. If you have any older versions of Xcode lying around, delete them. Maybe reinstall Xcode. Xcode 13 is still a little shaky.

Xcode 13 - MacOS 11.6
Maybe with a video you can see the problem in a better way.

that’s pretty strange … I can’t get mine to do that. Try restarting, reinstalling etc.

As a generic rule, I recommend sticking with app and os versions as specified in the book - The currently published version of the book says Xcode 12, if you use a newer version the risk is that you’ll run into compilation warnings or errors that weren’t happening before. SwiftUI is evolving from version to version, also from a behavioral standpoint, so features that were working perfectly in a specific version could be broken or behaving differently in the next version.

So if you’re still using Big Sur, I recommend using Xcode 12 (which doesn’t work in Monterey). We’re currently working on a new book update specifically for Xcode 13 and SwiftUI 3, but it’s still several weeks away.

1 Like