Swift单例创建的正确姿势
class SingleTon: NSObject {
static let sharedInstance = SingleTon()
private override init() {}
}
Swift单例创建的正确姿势
class SingleTon: NSObject {
static let sharedInstance = SingleTon()
private override init() {}
}
本文标题:Swift单例的创建姿势
本文链接:https://www.haomeiwen.com/subject/uwgydttx.html
网友评论