标签:
class func sharedInstance() -> GlobalConstant {
struct Singleton{
static var predicate:dispatch_once_t = 0
static var instance:GlobalConstant? = nil
}
dispatch_once(&Singleton.predicate,{
Singleton.instance = GlobalConstant()
}
)
return Singleton.instance!
}
标签:
原文地址:http://www.cnblogs.com/shidaying/p/4383285.html