|
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 |
TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!
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.