Group Group Group Group Group Group Group Group Group

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)
        }
      }
2 Likes