Hi all.
Trying to learn Swift.
Installed Xcode 9.2 (I don't want to take this iMac beyond OS 10.12.6) which, I believe is using Swift 4.
I found this wonderful Apple tutorial, named "Start Developing IOS Apps (Swift)", at https://developer.apple.com/library/archive/referencelibrary/GettingStarted/DevelopiOSAppsSwift/index.html#//apple_ref/doc/uid/TP40015214-CH2-SW1.
However, this document is no longer being updated and was last updated in December 2016; so the "project" is probably in Swift, Version 3. I was unable to find a more recent version of this document.
In the section titled "Define Your Data Model", we define a class to contain the data. There is an init (a function? a method?) that causes an error message. I've looked on the Web but could not find an answer.
The error msg is "Initializers may only be declared within a type".
The code looks like this:
Any idea what my next step should be?
Thanks!