Wrong code snippet on chapter 6.4

In Chapter 6.4 the last code snippet before “Styling the button” :

    window.rootViewController = UIHostingController(
      rootView: RegisterView(keyboardHandler: KeyboardFollower())
        .environmentObject(userManager)
    )

Should be :

    var body: some Scene {
        WindowGroup {
          RegisterView(keyboardHandler: KeyboardFollower())
            .environmentObject(userManager)
        }
      }
3 Likes

Hi,

I’ve been silent, but I read your post, and I’ve just made sure it’s fixed in the update I’m working on. Thanks a lot for reporting it!

hello, when will be released the fourth edition?

Unfortunately I don’t have a precise date, all I can say is that it’s a few weeks away.

1 Like