Chapter 4 Timers example problem
In trying to run the Threads.swift example code from Chapter 4 in a playground, I get an error message. Something does not like @objc attribute (described on page 90,Listing 4-3.
Here is the error message:
Playground execution failed: /var/folders/gm/468ly9qd1yndc1yvfmmdpy240000gn/T/./lldb/36063/playground31.swift:5:2: error: only classes that inherit from NSObject can be declared @objc
@objc class SayFunction {
Any ideas? I'm using XCode 7.2 and Swift 2.1.1
Last edited by SRJoye; January 23rd, 2016 at 07:06 PM..
|