单例
2017-05-25 本文已影响9人
George2016
单例的创建
class Apple: NSObject {
//创建单例
static let shared : Apple = {
let shared = Apple()
return shared;
}()
//懒加载
lazy var name: String = {
return ""
}()
}