# SwiftUI by Tutorials

**URL:** https://forums.kodeco.com/c/books/swiftui-by-tutorials/56.md?page=1

[Latest](https://forums.kodeco.com/latest.md) · [Categories](https://forums.kodeco.com/categories.md) · [Tags](https://forums.kodeco.com/tags.md)

**Page:** 2

---

## [Canvas crashing](https://forums.kodeco.com/t/canvas-crashing/161010)

<div class="topic-metadata">

**Author:** [@snackdog](https://forums.kodeco.com/u/snackdog)\
**Replies:** 11\
**Last updated:** [April 28, 2022, 12:32pm UTC](https://forums.kodeco.com/t/canvas-crashing/161010 "2022-04-28T12:32:14Z")

</div>

Has anyone else noticed that the Canvas / Preview pane crashes when a view contains an @FocusState variable? I also submitted feedback to Apple as I think this is an Xcode bug. But I wondered if anyone else was experienc…

---

## [\[Chapter 9\] Question about @EnvironmentObject](https://forums.kodeco.com/t/chapter-9-question-about-environmentobject/169893)

<div class="topic-metadata">

**Author:** [@diuming](https://forums.kodeco.com/u/diuming)\
**Replies:** 0\
**Last updated:** [April 27, 2022, 3:37am UTC](https://forums.kodeco.com/t/chapter-9-question-about-environmentobject/169893 "2022-04-27T03:37:26Z")

</div>

Hi, I know, it doesn’t make sense(2 objects the same type). but I just wanna figure out about @EnvironmentObject Does a view can only own an @EnvironmentObject? struct KuchiApp: App { @NSApplicationDelegateAdap…

---

## [Questions about RGBBullsEye on macOS](https://forums.kodeco.com/t/questions-about-rgbbullseye-on-macos/169494)

<div class="topic-metadata">

**Author:** [@diuming](https://forums.kodeco.com/u/diuming)\
**Replies:** 4\
**Last updated:** [April 26, 2022, 3:08am UTC](https://forums.kodeco.com/t/questions-about-rgbbullseye-on-macos/169494 "2022-04-26T03:08:23Z")

</div>

I reference your code and running on macOS. Could I just ask your some questions? Q1)How do I force divide content view width in half? Q2)How do I place the circle on the rightmost in green area? Q3)How do I avoid a …

---

## [\[Chapter 6\] Background image move when keyboard showup](https://forums.kodeco.com/t/chapter-6-background-image-move-when-keyboard-showup/153620)

<div class="topic-metadata">

**Author:** [@tringuyen623](https://forums.kodeco.com/u/tringuyen623)\
**Replies:** 4\
**Last updated:** [March 9, 2022, 11:53pm UTC](https://forums.kodeco.com/t/chapter-6-background-image-move-when-keyboard-showup/153620 "2022-03-09T23:53:09Z")

</div>

Hi everyone. In chapter 6 of this book. When keyboard show up the background image move to the right like this Before keyboard show up After Same with real device and simulator

---

## [Geometry Reader/Size of Child Views](https://forums.kodeco.com/t/geometry-reader-size-of-child-views/165302)

<div class="topic-metadata">

**Author:** [@lducot2](https://forums.kodeco.com/u/lducot2)\
**Replies:** 1\
**Last updated:** [February 25, 2022, 6:46pm UTC](https://forums.kodeco.com/t/geometry-reader-size-of-child-views/165302 "2022-02-25T18:46:05Z")

</div>

Hi - Hoping someone can point me to a resource/book chapter that will help me solve an issue I am unable to figure out. I have an HStack of 30 views embedded in a Scroll View. I’d like to show 3 at a time. I have trie…

---

## [Customize App Info Command Title](https://forums.kodeco.com/t/customize-app-info-command-title/165105)

<div class="topic-metadata">

**Author:** [@lducot2](https://forums.kodeco.com/u/lducot2)\
**Replies:** 2\
**Last updated:** [February 23, 2022, 10:48pm UTC](https://forums.kodeco.com/t/customize-app-info-command-title/165105 "2022-02-23T22:48:49Z")

</div>

Hello - I am trying to find the correct way to customize the title of the app info command menu. I may not be using the right terminology here, but the UI element I am referring to is the menu that is between the Apple …

---

## [Ch. 9: Where are EnvironmentValues' possible values documented?](https://forums.kodeco.com/t/ch-9-where-are-environmentvalues-possible-values-documented/165013)

<div class="topic-metadata">

**Author:** [@jimmythesaint](https://forums.kodeco.com/u/jimmythesaint)\
**Replies:** 4\
**Last updated:** [February 20, 2022, 6:59pm UTC](https://forums.kodeco.com/t/ch-9-where-are-environmentvalues-possible-values-documented/165013 "2022-02-20T18:59:52Z")

</div>

I see lists of EnvironmentValues documented online, but not the possible values each one can be set to. For example, verticalSizeLimit can be .compact and .regular, but where are .compact and .regular documented in relat…

---

## [Chapter 12 @AcceesibilityFocusState](https://forums.kodeco.com/t/chapter-12-acceesibilityfocusstate/162819)

<div class="topic-metadata">

**Author:** [@snackdog](https://forums.kodeco.com/u/snackdog)\
**Replies:** 0\
**Last updated:** [January 22, 2022, 11:00pm UTC](https://forums.kodeco.com/t/chapter-12-acceesibilityfocusstate/162819 "2022-01-22T23:00:58Z")

</div>

Just a minor thing: in addition to adding the isQuestionFocused property and setting up the action for the middle button, you have to update the text in the card like this: Text(flashCard.card.question) …

---

## [Refresh UI question](https://forums.kodeco.com/t/refresh-ui-question/161514)

<div class="topic-metadata">

**Author:** [@richmond\_jam](https://forums.kodeco.com/u/richmond_jam)\
**Replies:** 1\
**Last updated:** [January 16, 2022, 2:46pm UTC](https://forums.kodeco.com/t/refresh-ui-question/161514 "2022-01-16T14:46:30Z")

</div>

I have a question to make me puzzle why refresh UI must be in main thread?

---

## [Chapter 1 - Section 4 (Challenge part)](https://forums.kodeco.com/t/chapter-1-section-4-challenge-part/161482)

<div class="topic-metadata">

**Author:** [@hegazy](https://forums.kodeco.com/u/hegazy)\
**Replies:** 1\
**Last updated:** [January 4, 2022, 7:10pm UTC](https://forums.kodeco.com/t/chapter-1-section-4-challenge-part/161482 "2022-01-04T19:10:15Z")

</div>

SwiftUI doesn’t support putting a targetEnvironment() condition within the modifiers to a view. I think this is outdated right? now we can use targetEnvironment() condition within the modifiers to a view.

---

## [Chapter 7 should be improved](https://forums.kodeco.com/t/chapter-7-should-be-improved/90759)

<div class="topic-metadata">

**Author:** [@andyibanezk](https://forums.kodeco.com/u/andyibanezk)\
**Replies:** 17\
**Last updated:** [December 22, 2021, 10:30am UTC](https://forums.kodeco.com/t/chapter-7-should-be-improved/90759 "2021-12-22T10:30:19Z")

</div>

Hi. I’m a long-time RayWenderlich reader and I have read many of their books and tutorials since 2011, which is when I got into iOS development. The content is usually pretty high quality, so I’d like to voice my concern…

---

## [What's new in the 4th edition?](https://forums.kodeco.com/t/whats-new-in-the-4th-edition/157972)

<div class="topic-metadata">

**Author:** [@fischej](https://forums.kodeco.com/u/fischej)\
**Replies:** 4\
**Last updated:** [December 10, 2021, 1:31pm UTC](https://forums.kodeco.com/t/whats-new-in-the-4th-edition/157972 "2021-12-10T13:31:29Z")

</div>

I went through the 3rd edition already, and happy to see the arrival of the 4th. Is there a list of changes/additions? I’m trying to avoid going through the whole book again. Thanks.

---

## [Chapter 4,An "Invalid timestamps for HID response delay" thing i met](https://forums.kodeco.com/t/chapter-4-an-invalid-timestamps-for-hid-response-delay-thing-i-met/158563)

<div class="topic-metadata">

**Author:** [@sheffield](https://forums.kodeco.com/u/sheffield)\
**Replies:** 0\
**Last updated:** [November 25, 2021, 1:21pm UTC](https://forums.kodeco.com/t/chapter-4-an-invalid-timestamps-for-hid-response-delay-thing-i-met/158563 "2021-11-25T13:21:31Z")

</div>

Hi guys,i met a strange thing when following topic “Debugging views and state changes” at page 107,which is in Chapter 4: Testing & Debugging With page 107,first i add this line of code “let \_ = Self.\_printChanges()” af…

---

## [New content but boring covers](https://forums.kodeco.com/t/new-content-but-boring-covers/157770)

<div class="topic-metadata">

**Author:** [@human4](https://forums.kodeco.com/u/human4)\
**Replies:** 1\
**Last updated:** [November 21, 2021, 6:48am UTC](https://forums.kodeco.com/t/new-content-but-boring-covers/157770 "2021-11-21T06:48:45Z")

</div>

I notice all the books are changing their covers. The traditional covers were fun, creative Ray Wenderlinch distinctive. I use to read gladly the reasons for the choice and why it was related to the topic. Now the covers…

---

## [Chapter 7: History View Issues](https://forums.kodeco.com/t/chapter-7-history-view-issues/155474)

<div class="topic-metadata">

**Author:** [@vichudson1](https://forums.kodeco.com/u/vichudson1)\
**Replies:** 4\
**Last updated:** [November 18, 2021, 6:05pm UTC](https://forums.kodeco.com/t/chapter-7-history-view-issues/155474 "2021-11-18T18:05:18Z")

</div>

I’m not sure but I suspect the following problems may be a result of changes in Xcode 13, 13.1 specifically. The canvas preview stalls out for me and fails with more than 1000 random history items, may be my iMac but I …

---

## [Chapter 4: Can't find static text with display identifier](https://forums.kodeco.com/t/chapter-4-cant-find-static-text-with-display-identifier/156538)

<div class="topic-metadata">

**Author:** [@joseines](https://forums.kodeco.com/u/joseines)\
**Replies:** 2\
**Last updated:** [November 10, 2021, 4:45pm UTC](https://forums.kodeco.com/t/chapter-4-cant-find-static-text-with-display-identifier/156538 "2021-11-10T16:45:08Z")

</div>

I’m getting a failed to get matching snapshot for the display text. I’m using .accessibilityIdentifier(“display”) for the Text, as the .accessibility(identifier:) function is deprecated. Don’t really know how to debug t…

---

## [Problems with starter project](https://forums.kodeco.com/t/problems-with-starter-project/149108)

<div class="topic-metadata">

**Author:** [@gaspare92](https://forums.kodeco.com/u/gaspare92)\
**Replies:** 4\
**Last updated:** [October 8, 2021, 8:56am UTC](https://forums.kodeco.com/t/problems-with-starter-project/149108 "2021-10-08T08:56:11Z")

</div>

Every Chapter start with: “Open the starter project or continue with your project.” The problem is that the starter project already include all the files and lines of code explained in the chapter and look like a final p…

---

## [Wrong code snippet on chapter 6.4](https://forums.kodeco.com/t/wrong-code-snippet-on-chapter-6-4/139595)

<div class="topic-metadata">

**Author:** [@fabienml](https://forums.kodeco.com/u/fabienml)\
**Replies:** 3\
**Last updated:** [October 7, 2021, 7:16am UTC](https://forums.kodeco.com/t/wrong-code-snippet-on-chapter-6-4/139595 "2021-10-07T07:16:04Z")

</div>

In Chapter 6.4 the last code snippet before “Styling the button” : window.rootViewController = UIHostingController( rootView: RegisterView(keyboardHandler: KeyboardFollower()) .environmentObject(userMa…

---

## [Chapter 3 - GeometryReader](https://forums.kodeco.com/t/chapter-3-geometryreader/149513)

<div class="topic-metadata">

**Author:** [@pwburns](https://forums.kodeco.com/u/pwburns)\
**Replies:** 1\
**Last updated:** [October 6, 2021, 1:40am UTC](https://forums.kodeco.com/t/chapter-3-geometryreader/149513 "2021-10-06T01:40:24Z")

</div>

After following along to where I added the GeometryReader to adjust for different screen sizes it caused my circles to appear left-aligned instead of center-aligned like they were before and how they appear in the book. …

---

## [.animation Modifier](https://forums.kodeco.com/t/animation-modifier/148884)

<div class="topic-metadata">

**Author:** [@gaspare92](https://forums.kodeco.com/u/gaspare92)\
**Replies:** 3\
**Last updated:** [October 4, 2021, 9:02am UTC](https://forums.kodeco.com/t/animation-modifier/148884 "2021-10-04T09:02:34Z")

</div>

Hello Everyone, I’m currently reading Chapter 11: Gestures. .animation(\_ animation:) modifier is deprecated and in iOS 15 there is a required parameter “value” where, according to apple documentation, “value” is “A val…

---

## [A clarification is needed](https://forums.kodeco.com/t/a-clarification-is-needed/136841)

<div class="topic-metadata">

**Author:** [@chinggis](https://forums.kodeco.com/u/chinggis)\
**Replies:** 2\
**Last updated:** [September 19, 2021, 11:44pm UTC](https://forums.kodeco.com/t/a-clarification-is-needed/136841 "2021-09-19T23:44:20Z")

</div>

In 6.3, under Creating a Custom Modifier, “To apply it, you use a struct named ModifiedContent…”, should say, “To apply it, you create an instance of the struct ModifiedContent (part of the SwiftUI framework)…” The way …

---

## [Errata for SwiftUI by Tutorials, 3rd Edition](https://forums.kodeco.com/t/errata-for-swiftui-by-tutorials-3rd-edition/135293)

<div class="topic-metadata">

**Author:** [@jellodiil](https://forums.kodeco.com/u/jellodiil)\
**Replies:** 36\
**Last updated:** [September 2, 2021, 10:29am UTC](https://forums.kodeco.com/t/errata-for-swiftui-by-tutorials-3rd-edition/135293 "2021-09-02T10:29:26Z")

</div>

Creating this topic to catch any typos and bugs in the 3rd Edition of SwiftUI by Tutorials.

---

## [Ch 9 - Cannot render completed example](https://forums.kodeco.com/t/ch-9-cannot-render-completed-example/142596)

<div class="topic-metadata">

**Author:** [@wikea1](https://forums.kodeco.com/u/wikea1)\
**Replies:** 1\
**Last updated:** [September 2, 2021, 10:21am UTC](https://forums.kodeco.com/t/ch-9-cannot-render-completed-example/142596 "2021-09-02T10:21:51Z")

</div>

I’m on the last page of chapter 9 before the “cleaning up” section. It states that I need to change ScoreView’s initializer from numberOfAnswered to $numberOfAnswered in order to utilize the new change from @State to @Bi…

---

## [Chapter 6: Question on "Dependency Injection"](https://forums.kodeco.com/t/chapter-6-question-on-dependency-injection/141592)

<div class="topic-metadata">

**Author:** [@fischej](https://forums.kodeco.com/u/fischej)\
**Replies:** 3\
**Last updated:** [September 2, 2021, 9:59am UTC](https://forums.kodeco.com/t/chapter-6-question-on-dependency-injection/141592 "2021-09-02T09:59:26Z")

</div>

Always trying to learn, so I’m curious about the code added to RegisterView.swift to initialize the keyboardHandler property: init(keyboardHandler: KeyboardFollower) { self.keyboardHandler = keyboardHandler } Why is …

---

## [\[Chapter 15: Grids\] AwardsView body indirectly uses \`flightNavigation \`](https://forums.kodeco.com/t/chapter-15-grids-awardsview-body-indirectly-uses-flightnavigation/146188)

<div class="topic-metadata">

**Author:** [@altairs99](https://forums.kodeco.com/u/altairs99)\
**Replies:** 2\
**Last updated:** [August 20, 2021, 12:02pm UTC](https://forums.kodeco.com/t/chapter-15-grids-awardsview-body-indirectly-uses-flightnavigation/146188 "2021-08-20T12:02:31Z")

</div>

Hello @bmorefield , Thank you for the great article for Grids. I am wandering about content view refresh for AwardsView when we indirectly use flightNavigation via computed properties: @EnvironmentObject var flightNa…

---

## [Fatal error at Chapter 21.7](https://forums.kodeco.com/t/fatal-error-at-chapter-21-7/146031)

<div class="topic-metadata">

**Author:** [@fischej](https://forums.kodeco.com/u/fischej)\
**Replies:** 0\
**Last updated:** [August 11, 2021, 9:57pm UTC](https://forums.kodeco.com/t/fatal-error-at-chapter-21-7/146031 "2021-08-11T21:57:06Z")

</div>

Couldn’t post this in Errata since there have been no replies to my three previous posts, and the forum software/settings don’t allow four consecutive posts. :frowning: The first instruction in 21.7 is to build and run …

---

## [How to finish a custom keyboard with SwiftUI](https://forums.kodeco.com/t/how-to-finish-a-custom-keyboard-with-swiftui/145894)

<div class="topic-metadata">

**Author:** [@richmond\_jam](https://forums.kodeco.com/u/richmond_jam)\
**Replies:** 0\
**Last updated:** [August 10, 2021, 6:29am UTC](https://forums.kodeco.com/t/how-to-finish-a-custom-keyboard-with-swiftui/145894 "2021-08-10T06:29:23Z")

</div>

Hello, I want to finish a custom keyboard with SwiftUI but I have no idea to complete and I can not find some way in SwiftUI by Tutorials 3rd Edition. So is there anyone can help me?

---

## [Lacks MacOS support](https://forums.kodeco.com/t/lacks-macos-support/91988)

<div class="topic-metadata">

**Author:** [@coloretiree](https://forums.kodeco.com/u/coloretiree)\
**Replies:** 7\
**Last updated:** [August 8, 2021, 10:04pm UTC](https://forums.kodeco.com/t/lacks-macos-support/91988 "2021-08-08T22:04:41Z")

</div>

I bought the digital version of “SwiftUI of Tutorials” book ($59.95) because the website specifically states Build modern, responsive UI and animations that look great on iOS, iPadOS, watchOS, tvOS or even macOS! This …

---

## [PDF Version 3rd edition?](https://forums.kodeco.com/t/pdf-version-3rd-edition/135481)

<div class="topic-metadata">

**Author:** [@appelflap](https://forums.kodeco.com/u/appelflap)\
**Replies:** 2\
**Last updated:** [August 3, 2021, 10:04pm UTC](https://forums.kodeco.com/t/pdf-version-3rd-edition/135481 "2021-08-03T22:04:12Z")

</div>

Hi, Will there be a PDF version of the 3rd edition? I’m relying heavily on the way I can make notes, annotations, drawings etc in PDF documents. ePub is so extremely limited in this respect… Also, I have set up a libra…

---

## [\[State & Data Flow. Part2\] ScoreView uses @Binding for \`numberOfAnswered\` but never mutates it, use \`let\` instead?](https://forums.kodeco.com/t/state-data-flow-part2-scoreview-uses-binding-for-numberofanswered-but-never-mutates-it-use-let-instead/144899)

<div class="topic-metadata">

**Author:** [@altairs99](https://forums.kodeco.com/u/altairs99)\
**Replies:** 1\
**Last updated:** [July 28, 2021, 7:20am UTC](https://forums.kodeco.com/t/state-data-flow-part2-scoreview-uses-binding-for-numberofanswered-but-never-mutates-it-use-let-instead/144899 "2021-07-28T07:20:26Z")

</div>

Hello @jeden , I am wandering if property @Binding var numberOfAnswered can be replaced with let numberOfAnswered , sine it never gets mutated inside the view. Or there’s another reason why it’s Binding? body seems jus…

[Previous page](https://forums.kodeco.com/c/books/swiftui-by-tutorials/56.md)

[Next page](https://forums.kodeco.com/c/books/swiftui-by-tutorials/56.md?page=2)
