class Singleton {
// “懒实例化”的全局变量会被自动放在dispatch_once块中
static let singleton = Singleton()
private init(){}
}
或
class SingletonManager: NSObject {
static let singleton = SingletonManager()
private override init() {
}
}
- 邮箱 :charon.chui@gmail.com
- Good Luck!