Group Group Group Group Group Group Group Group Group

Extracting subviews - ch 2

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

hi @fc_katoch! It’s still working when I do it, in Xcode 11.3.1.

Right after you select Extract subview from the menu, ExtractedSubview is highlighted. If you rename it while it’s highlighted, the new name appears in two places: where you extracted from, and the extracted subview, down at the bottom of the file.

If you don’t rename it in time, then you have to manually change the name of the extracted subview.

Does your code look like the final project? I’d normally ask what compile errors you’re getting, but that doesn’t mean much in SwiftUI. Although the error messages are supposed to be better in 11.4 beta.

Thanks Audrey! for reply. yeah, I am using Xcode 11,3,1
I have done every thing what you have said and same is mentioned in SwiftUI Digital Book. But getting compiler errors.
Code is running perfect till I reaches upto Extract subview. I don’t have Source Code of the Project
RGB Bullseye in Chapter 2. So that I could check complete coding. I don’t have the link to download the Source Code of this Book. If you have the link then please send me.

if you have the digital download, then the source code is included.

the link to code for the print version is in Book Source Code and Forums, at the start of the pdf.

Thanks Audrey for all the help!!

1 Like