1. 程式人生 > >swift中單例的使用

swift中單例的使用

class CityManager: NSObject {

// 單例模式
static let manager = CityManager()
private override init() { }

}