I hope this is an alright place to ask this. On top of CWC, I’m also doing Apple’s App Development courses. And I’m stuck on a step in the textbook. I’ve tried searching online, but I’m not sure what’s going wrong so I’m stuck. I was hoping someone familiar with code could help me understand where I went wrong in the instructions.
Here Are The Instructions from the Textbook
“Create a custom initializer with the signature init?(coder: NSCoder, athlete: Athlete?). Assign self.athlete to your instance variable and call the super implementation. Satisfy the compilation error that this creates by using Xcode’s fix-it suggestion.”
I thought the only part of this instruction that I didn’t understand was what “instance variable” it’s referring to. I’m still a little fuzzy on what that term means.
Here Is What I’ve Done In My Code
Every time I try to open a AthleteFormViewController, it hits the required init with the fatal error. I don’t understand why it’s using that initializer instead of my custom one.
Develop in Swift Data Collections
Develop in Swift Data Collections on Apple Books
This material may be protected by copyright.