[ios] ios에서 singleton 생성하기
ingleton 객체 생성 할 때, 어플리케이션 life cycle동안 한 번만 불릴 수 있도록 조절한다 아래와 같이 thread-safe를 위해 dispatch_once() 를 사용하자. [OBJECTIVE - C] static Manager *_sharedManagerInstance = nil; + (void) close { _sharedManagerInstance = nil; } + (Manager *)sharedManager { static dispatch_once_t predicate; dispatch_once(&predicate, ^{ _sharedManagerInstance = [[self alloc] init]; }); return _sharedManagerInstance; } [SWIFT..
study - iOS
2019. 4. 21. 23:07
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 백그라운드
- ios
- xcode
- ADID
- SVG
- iOS #앱개발
- 카플레이
- 파일변환
- iBeacon
- IDFA
- 비콘
- GAID
- UIPageViewController
- uuid
- TimeZone
- backgroundTask
- Instance
- Beacon
- Singleton
- ios #DRM #Media #codec #swift #audio #fairplay #widevine #playready
- RxSwift
- 반응형프로그래밍
- iOS비콘
- DeviceID
- 세계시간
- UDID
- 앱개발
- Swift
- RECO
- CarPlay
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
글 보관함