# SwiftUI by Tutorials

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

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

**Page:** 5

---

## [Inconsistent transition from chapter 6 to chapter 7](https://forums.kodeco.com/t/inconsistent-transition-from-chapter-6-to-chapter-7/85574)

<div class="topic-metadata">

**Author:** [@radicalappdev](https://forums.kodeco.com/u/radicalappdev)\
**Replies:** 14\
**Last updated:** [July 2, 2020, 11:38pm UTC](https://forums.kodeco.com/t/inconsistent-transition-from-chapter-6-to-chapter-7/85574 "2020-07-02T23:38:03Z")

</div>

Chapter 6 starts a new project called Kuchi with some minimal resources. We add a few views and learn about modifiers. Then in Chapter 7 there seems to be a huge break in the content. There is a short description of Stat…

---

## [Chapter 6: .multilineTextAlignment(.leading) has no effect](https://forums.kodeco.com/t/chapter-6-multilinetextalignment-leading-has-no-effect/113341)

<div class="topic-metadata">

**Author:** [@jvantoor](https://forums.kodeco.com/u/jvantoor)\
**Replies:** 1\
**Last updated:** [June 27, 2020, 11:10pm UTC](https://forums.kodeco.com/t/chapter-6-multilinetextalignment-leading-has-no-effect/113341 "2020-06-27T23:10:05Z")

</div>

I use the following code in the welcome view. But when looking at the preview, “Kuchi” appears to be centered below “Welcome to”, rather than being left aligned as the image in the book suggests. VStack { Text("Wel…

---

## [Ch13 Preview Correction](https://forums.kodeco.com/t/ch13-preview-correction/111777)

<div class="topic-metadata">

**Author:** [@rlegault](https://forums.kodeco.com/u/rlegault)\
**Replies:** 1\
**Last updated:** [June 25, 2020, 10:29pm UTC](https://forums.kodeco.com/t/ch13-preview-correction/111777 "2020-06-25T22:29:07Z")

</div>

Need to use preferredColorScheme in preview. The previous code would not change the background. struct FirstVisitAward\_Previews: PreviewProvider { static var previews: some View { Group { FirstVi…

---

## [What the heck does 8cool mean?](https://forums.kodeco.com/t/what-the-heck-does-8cool-mean/112742)

<div class="topic-metadata">

**Author:** [@snackdog](https://forums.kodeco.com/u/snackdog)\
**Replies:** 4\
**Last updated:** [June 24, 2020, 4:09pm UTC](https://forums.kodeco.com/t/what-the-heck-does-8cool-mean/112742 "2020-06-24T16:09:00Z")

</div>

Just read chapter 2 and the $ for bindings is described as “8cool.” I couldn’t find it in Urban Dictionary — I want to be cool too — what does this mean?

---

## [Chapter 15 (Ed. 1 & 2) Using TimelineTableViewCell](https://forums.kodeco.com/t/chapter-15-ed-1-2-using-timelinetableviewcell/112691)

<div class="topic-metadata">

**Author:** [@king9671152](https://forums.kodeco.com/u/king9671152)\
**Replies:** 5\
**Last updated:** [June 22, 2020, 9:57pm UTC](https://forums.kodeco.com/t/chapter-15-ed-1-2-using-timelinetableviewcell/112691 "2020-06-22T21:57:04Z")

</div>

Are we supposed to use Swift Package Manager or CocoaPods to install TimelineTableViewCell or something? If I open the starter project, I see TimelineTableViewCell. In fact, the book (Ed. 2) says “The starter project f…

---

## [Chapter 4: Integrating UIViewController into SwiftUI](https://forums.kodeco.com/t/chapter-4-integrating-uiviewcontroller-into-swiftui/112253)

<div class="topic-metadata">

**Author:** [@king9671152](https://forums.kodeco.com/u/king9671152)\
**Replies:** 2\
**Last updated:** [June 22, 2020, 3:01am UTC](https://forums.kodeco.com/t/chapter-4-integrating-uiviewcontroller-into-swiftui/112253 "2020-06-22T03:01:50Z")

</div>

Chapter 4 talks about how to transition from UIViewController’s to SwiftUI’s view by tapping a a push button. I wonder if we can go from SwiftUI’s view to a view controller by tapping a button like the following? impor…

---

## [Chapter 8 background is not stretched](https://forums.kodeco.com/t/chapter-8-background-is-not-stretched/110765)

<div class="topic-metadata">

**Author:** [@rlegault](https://forums.kodeco.com/u/rlegault)\
**Replies:** 3\
**Last updated:** [June 19, 2020, 12:38pm UTC](https://forums.kodeco.com/t/chapter-8-background-is-not-stretched/110765 "2020-06-19T12:38:56Z")

</div>

Xcode 11.5 In RegisterView When using the VSTACK { … } .background(WelcomeBackgroundImage()) The image appears as if the resizable() is not used see above. The same behaviour is seen when I compile the FINAL direct…

---

## [Metal and SwiftUI](https://forums.kodeco.com/t/metal-and-swiftui/111607)

<div class="topic-metadata">

**Author:** [@lducot2](https://forums.kodeco.com/u/lducot2)\
**Replies:** 1\
**Last updated:** [June 10, 2020, 12:22am UTC](https://forums.kodeco.com/t/metal-and-swiftui/111607 "2020-06-10T00:22:41Z")

</div>

Hello everyone, I’m curious to know if anyone has tested using a metal kit view in SwiftUI. I was thinking about experimenting to see if there are any performance or other issues. But I thought someone here might have g…

---

## [SwiftUI with Metal](https://forums.kodeco.com/t/swiftui-with-metal/104884)

<div class="topic-metadata">

**Author:** [@yangfengzzz](https://forums.kodeco.com/u/yangfengzzz)\
**Replies:** 1\
**Last updated:** [April 12, 2020, 1:16am UTC](https://forums.kodeco.com/t/swiftui-with-metal/104884 "2020-04-12T01:16:02Z")

</div>

I just read Metal by Tutorials and SwiftUI by Tutorials, But I don’t figure out how to combine Metal and SwiftUI together. Is There possible to include this part in the next version of this book?

---

## [Chapter 10, Adding an action sheet](https://forums.kodeco.com/t/chapter-10-adding-an-action-sheet/87426)

<div class="topic-metadata">

**Author:** [@wrtiede](https://forums.kodeco.com/u/wrtiede)\
**Replies:** 3\
**Last updated:** [April 8, 2020, 11:28pm UTC](https://forums.kodeco.com/t/chapter-10-adding-an-action-sheet/87426 "2020-04-08T23:28:14Z")

</div>

In the section in Chapter 10 on adding an action sheet, there is a line in the code that checks if flight.status is ontime or delayed. However, it is flight.flightStatus, not flight.status that is used to display the ro…

---

## [Chapter 5 - entering the Mac Catalyst App](https://forums.kodeco.com/t/chapter-5-entering-the-mac-catalyst-app/87344)

<div class="topic-metadata">

**Author:** [@thierry](https://forums.kodeco.com/u/thierry)\
**Replies:** 7\
**Last updated:** [April 6, 2020, 5:38am UTC](https://forums.kodeco.com/t/chapter-5-entering-the-mac-catalyst-app/87344 "2020-04-06T05:38:55Z")

</div>

Hi All, Following the steps in the book for enabling running the iOS app on the Mac, I got a long warning in the output window : BullsEyePlus\[2609:105114\] \[User Defaults\] Couldn’t write values for keys (ApplicationAcce…

---

## [If you have two views, why you have to add Stack on it?](https://forums.kodeco.com/t/if-you-have-two-views-why-you-have-to-add-stack-on-it/103601)

<div class="topic-metadata">

**Author:** [@maomao](https://forums.kodeco.com/u/maomao)\
**Replies:** 2\
**Last updated:** [April 2, 2020, 4:02am UTC](https://forums.kodeco.com/t/if-you-have-two-views-why-you-have-to-add-stack-on-it/103601 "2020-04-02T04:02:44Z")

</div>

I want to know the reason why we have to add VStack or HStack as a parent if you add two subview inside it.:slight\_smile: Thanks

---

## [Building a custom designed form](https://forums.kodeco.com/t/building-a-custom-designed-form/97436)

<div class="topic-metadata">

**Author:** [@thiqahiosteam](https://forums.kodeco.com/u/thiqahiosteam)\
**Replies:** 1\
**Last updated:** [March 31, 2020, 1:51am UTC](https://forums.kodeco.com/t/building-a-custom-designed-form/97436 "2020-03-31T01:51:10Z")

</div>

As SwiftUI has a collection of elements that each of them serves as the main building block to make up a form such as: Form , List, ScrollView , VStack , Group , etc … However, I got confused choosing the best ite…

---

## [Chapter 3 - Embed in NavigationView No Display](https://forums.kodeco.com/t/chapter-3-embed-in-navigationview-no-display/85010)

<div class="topic-metadata">

**Author:** [@superbaker](https://forums.kodeco.com/u/superbaker)\
**Replies:** 10\
**Last updated:** [March 29, 2020, 1:35am UTC](https://forums.kodeco.com/t/chapter-3-embed-in-navigationview-no-display/85010 "2020-03-29T01:35:14Z")

</div>

In Chapter 3 when you embed the VStack in a NavigationView, the canvas shows a blank area over the top of the view and when the simulator is run the entire screen is blank. At first I thought it was my code but if I run…

---

## [SwiftUI book source code](https://forums.kodeco.com/t/swiftui-book-source-code/86914)

<div class="topic-metadata">

**Author:** [@cleverclosure](https://forums.kodeco.com/u/cleverclosure)\
**Replies:** 3\
**Last updated:** [November 4, 2019, 2:34pm UTC](https://forums.kodeco.com/t/swiftui-book-source-code/86914 "2019-11-04T14:34:58Z")

</div>

The link to source code in the book (https://store.raywenderlich.com/products/swift-ui-by-tutorials-source-code) is showing 404 error.

---

## [Chapter 4--Hosting ViewControllers In SwiftUI](https://forums.kodeco.com/t/chapter-4-hosting-viewcontrollers-in-swiftui/102163)

<div class="topic-metadata">

**Author:** [@anon92882318](https://forums.kodeco.com/u/anon92882318)\
**Replies:** 2\
**Last updated:** [March 20, 2020, 9:51am UTC](https://forums.kodeco.com/t/chapter-4-hosting-viewcontrollers-in-swiftui/102163 "2020-03-20T09:51:05Z")

</div>

I am using the code in the book to host a ViewController in a SwiftUI project. I use instead of “ViewController”, “DocumentSaveViewController” and my StoryBoard ID is “DocumentSave”. Compiles okay but when I hit the Tex…

---

## [Extracting subviews - ch 2](https://forums.kodeco.com/t/extracting-subviews-ch-2/99854)

<div class="topic-metadata">

**Author:** [@fc\_katoch](https://forums.kodeco.com/u/fc_katoch)\
**Replies:** 4\
**Last updated:** [February 29, 2020, 6:43am UTC](https://forums.kodeco.com/t/extracting-subviews-ch-2/99854 "2020-02-29T06:43:55Z")

</div>

Chapter 2. Extracting subviews This needs to some more explanation . As shown in book. It does not compile. Please help if you can

---

## [Chapter 4--Getting Error: Use of unresolved identifier 'ViewControllerRepresentation'](https://forums.kodeco.com/t/chapter-4-getting-error-use-of-unresolved-identifier-viewcontrollerrepresentation/99329)

<div class="topic-metadata">

**Author:** [@anon92882318](https://forums.kodeco.com/u/anon92882318)\
**Replies:** 2\
**Last updated:** [February 23, 2020, 11:41pm UTC](https://forums.kodeco.com/t/chapter-4-getting-error-use-of-unresolved-identifier-viewcontrollerrepresentation/99329 "2020-02-23T23:41:20Z")

</div>

I am trying to adapt another project using the “Hosting a view controller in a SwiftUI Project”. I use ViewController as instructed with the appropriate representation struct. But when I put in my Navigation from Conten…

---

## [What happened to Chapter 16 ? (SwiftUI by Tutorials)](https://forums.kodeco.com/t/what-happened-to-chapter-16-swiftui-by-tutorials/90598)

<div class="topic-metadata">

**Author:** [@justinjngan](https://forums.kodeco.com/u/justinjngan)\
**Replies:** 3\
**Last updated:** [February 18, 2020, 10:10am UTC](https://forums.kodeco.com/t/what-happened-to-chapter-16-swiftui-by-tutorials/90598 "2020-02-18T10:10:29Z")

</div>

@raywenderlich At the end of Chapter 6 in an earlier release of SwiftUI by Tutorials there is a mention of learning more about Fonts in Chapter 16: “You’ll learn more about fonts and accessibility in Chapter 16, “Expa…

---

## [When will the mess with chapters 6 - 8 be resolved?](https://forums.kodeco.com/t/when-will-the-mess-with-chapters-6-8-be-resolved/97608)

<div class="topic-metadata">

**Author:** [@tanderza](https://forums.kodeco.com/u/tanderza)\
**Replies:** 3\
**Last updated:** [February 13, 2020, 3:17pm UTC](https://forums.kodeco.com/t/when-will-the-mess-with-chapters-6-8-be-resolved/97608 "2020-02-13T15:17:46Z")

</div>

Its been. few months now and I see there is still no update to this book that resolves the mess that is chapters 6 to 8? I’ve had to stop reading the book because of this. :confused:

---

## [Value of type 'Button\<Text\>' has no member 'alert'](https://forums.kodeco.com/t/value-of-type-button-text-has-no-member-alert/81404)

<div class="topic-metadata">

**Author:** [@stevelhunt](https://forums.kodeco.com/u/stevelhunt)\
**Replies:** 7\
**Last updated:** [January 29, 2020, 9:18pm UTC](https://forums.kodeco.com/t/value-of-type-button-text-has-no-member-alert/81404 "2020-01-29T21:18:32Z")

</div>

In the SwiftUI sample program RGBullseye, I get the above error when compiling. What has happened? Steve

---

## [Chapter 6 - Circle Border](https://forums.kodeco.com/t/chapter-6-circle-border/92278)

<div class="topic-metadata">

**Author:** [@jnjsjmiller](https://forums.kodeco.com/u/jnjsjmiller)\
**Replies:** 2\
**Last updated:** [January 21, 2020, 6:53am UTC](https://forums.kodeco.com/t/chapter-6-circle-border/92278 "2020-01-21T06:53:23Z")

</div>

On page 103, adding the border - .border(Color.gray, width: 1) does not add the border to the circle created by the .cornerRadius but to the original square view. To get the intended border, should it be: .overlay(Ci…

---

## [Chapter 7: Some confusing terms](https://forums.kodeco.com/t/chapter-7-some-confusing-terms/94382)

<div class="topic-metadata">

**Author:** [@trungngo](https://forums.kodeco.com/u/trungngo)\
**Replies:** 1\
**Last updated:** [January 13, 2020, 10:47pm UTC](https://forums.kodeco.com/t/chapter-7-some-confusing-terms/94382 "2020-01-13T22:47:51Z")

</div>

While reading chapter 7, I found out some confusing terms as follows: 1. hierarchical position raise the hierarchical position of the PracticeScore binding want to pass the @State value down the hierarchy I really do…

---

## [Chapter 5 - No such module 'Game'](https://forums.kodeco.com/t/chapter-5-no-such-module-game/87759)

<div class="topic-metadata">

**Author:** [@hyegon](https://forums.kodeco.com/u/hyegon)\
**Replies:** 8\
**Last updated:** [January 11, 2020, 11:24pm UTC](https://forums.kodeco.com/t/chapter-5-no-such-module-game/87759 "2020-01-11T23:24:30Z")

</div>

HI …! In my project I get the following error: Error list: BullsEyePlus Group Swift Compiler Error Group /BullsEyePlus/BullsEyePlus/ContentView.swift:33:38: Use of unresolved identifier ‘BullsEyeGame’ BullsEyePlus …

---

## [Editing notes for next version](https://forums.kodeco.com/t/editing-notes-for-next-version/87812)

<div class="topic-metadata">

**Author:** [@rcritz](https://forums.kodeco.com/u/rcritz)\
**Replies:** 1\
**Last updated:** [January 11, 2020, 7:06pm UTC](https://forums.kodeco.com/t/editing-notes-for-next-version/87812 "2020-01-11T19:06:52Z")

</div>

References to other chapters are formatted incorrectly. See the English Style Guide for correct formatting. A number of fenced code sections aren’t wrapping properly.

---

## [Chapter 4: "This Binding\<Double\> syntax ... works ... but this might be a bug."](https://forums.kodeco.com/t/chapter-4-this-binding-double-syntax-works-but-this-might-be-a-bug/92831)

<div class="topic-metadata">

**Author:** [@billm](https://forums.kodeco.com/u/billm)\
**Replies:** 3\
**Last updated:** [December 28, 2019, 10:57pm UTC](https://forums.kodeco.com/t/chapter-4-this-binding-double-syntax-works-but-this-might-be-a-bug/92831 "2019-12-28T22:57:23Z")

</div>

“This Binding syntax for declaring a binding works better in this not-strictly-SwiftUI setting, but this might be a bug.” I’m confused, can you help me understand what this means?

---

## [Chapter 11 Can't do UI Test](https://forums.kodeco.com/t/chapter-11-cant-do-ui-test/89171)

<div class="topic-metadata">

**Author:** [@hyegon](https://forums.kodeco.com/u/hyegon)\
**Replies:** 2\
**Last updated:** [December 19, 2019, 12:47am UTC](https://forums.kodeco.com/t/chapter-11-cant-do-ui-test/89171 "2019-12-19T00:47:08Z")

</div>

page 266 ~ 267 When running in debugging mode let app = XCUIApplication () This code gives an error. The error message is You get “caught” NSInternalInconsistencyException “,” No target application path specified via…

---

## [Chapter 5 - 'show\_hint' conditional crashes app in iOS target](https://forums.kodeco.com/t/chapter-5-show-hint-conditional-crashes-app-in-ios-target/91852)

<div class="topic-metadata">

**Author:** [@psoybean](https://forums.kodeco.com/u/psoybean)\
**Replies:** 3\
**Last updated:** [December 17, 2019, 10:45pm UTC](https://forums.kodeco.com/t/chapter-5-show-hint-conditional-crashes-app-in-ios-target/91852 "2019-12-17T22:45:07Z")

</div>

On page 104 (in v.1.1.0), when adding conditional for ‘if defaults.bool(forKey: “show\_hint”)’, it worked fine when running on MacCatalyst (My Mac), but when I went back to trying to run the Preview for an iPhone, the app…

---

## [Chapter 5, watch extension, error on live preview](https://forums.kodeco.com/t/chapter-5-watch-extension-error-on-live-preview/85464)

<div class="topic-metadata">

**Author:** [@prenez01](https://forums.kodeco.com/u/prenez01)\
**Replies:** 5\
**Last updated:** [December 17, 2019, 8:43pm UTC](https://forums.kodeco.com/t/chapter-5-watch-extension-error-on-live-preview/85464 "2019-12-17T20:43:40Z")

</div>

live preview doesn’t work in XCode 11.1 or either of the 11.2 betas. Tried selecting both watch sizes. LATER fixed it. you have to search for com.raywenderlich throughout the code if you change the identifier, make bu…

---

## [Chapter 4 - Tapping \`Play BullsEye\` is not working more than once](https://forums.kodeco.com/t/chapter-4-tapping-play-bullseye-is-not-working-more-than-once/91480)

<div class="topic-metadata">

**Author:** [@pgudivada](https://forums.kodeco.com/u/pgudivada)\
**Replies:** 3\
**Last updated:** [December 14, 2019, 9:50pm UTC](https://forums.kodeco.com/t/chapter-4-tapping-play-bullseye-is-not-working-more-than-once/91480 "2019-12-14T21:50:31Z")

</div>

Issue is also in the RGBullsEye of the final folder of 04-integrating-swiftui. TappingPlay BullsEye navigates to the view of Bulls Eye Play once and then tap Back which navigates back to the RGBullsEye Tapping Play Bul…

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

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