import UIKit
private let _SingletonSharedInstance = HYCommon_Swift() /* 내 클래스 이름*/
class HYCommon_Swift: NSObject {
class var sharedInstance: HYCommon_Swift {
return _SingletonSharedInstance
}
}
실제 추가되는 코드는 아래와 같다.
private let _SingletonSharedInstance = HYCommon_Swift() /* 내 클래스 이름*/
class var sharedInstance: HYCommon_Swift {
return _SingletonSharedInstance
}
쉽죠잉?
'SWIFT' 카테고리의 다른 글
스위프트 ARC와 순환참조와 클로저 (0) | 2017.09.07 |
---|---|
guard 문 (0) | 2016.04.07 |
AlertView 띄우기 (iOS7,8)- Swift (0) | 2015.01.21 |
Apple Swift Programming Language for KOREAN - 배포중 (0) | 2014.06.12 |