|
I am trying to display text stored in an array and it's showing the error
Here is the data structure it is reading from:
Thanks in advance for your help. |
|
You would use
which is the equivalent of this:
Also, you should not name properties using capital letters. Capitalized names are for types; start property and function names with a lowercase letter. So...
You can even see that the syntax coloring applied by the forums colors names differently if they start with a capital letter versus starting with a lowercase letter. Because those conventions—while being only convention, not a rule—have meaning in Swift. |
|
Thank you. I have renamed
I receive the error When I attempt to use
I get the error |
|
Then your
However that will fail as Either
or
If you use the
|
|
When I try both the |
|
This uses Edit:
|
|
Unless I'm missing something that's what I already have, and is producing the error, because I've already changed |
|
Try cleaning your build folder. See if that helps. Also, did you try copying and pasting the code I uploaded? |
|
I have cleared the build folder, and the only difference between your code and mine is that I'm calling
in the |
BUILD THE ULTIMATE PORTFOLIO APP Most Swift tutorials help you solve one specific problem, but in my Ultimate Portfolio App series I show you how to get all the best practices into a single app: architecture, testing, performance, accessibility, localization, project organization, and so much more, all while building a SwiftUI app that works on iOS, macOS and watchOS.
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.