问题
I know this question was asked before, but I didn't find an answer in relation to Xcode 7 and Swift 2. Many answers are just ambiguous, incorrect or outdated.
Is there a clear way to import a single class or a set of classes to a playground?
回答1:
In the Playground go to menu
View / Navigators / Show Project Navigator
and copy your class files into the Sources folder.
Your classes have to be marked public like this:
public class MyPlayGround {
    public class func sayHello() {
        print("Hello")
    }
}
The Playground will then have access to the classes:
MyPlayGround.sayHello()
    来源:https://stackoverflow.com/questions/32722275/how-to-import-my-own-class-into-an-xcode-7-playground