View Single Post
  #1 (permalink)  
Old January 23rd, 2016, 07:03 PM
SRJoye SRJoye is offline
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2016
Location: Shasta County, northern California
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Red face 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.
Reply With Quote