| ์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
|---|---|---|---|---|---|---|
| 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 |
Tags
- nodejs
- Core Data
- Figma
- components
- MongoDB
- ์ฑ๋์์ธ
- ExpressJS
- ํ๋ก๊ทธ๋๋จธ์ค
- Encodable
- CRUD
- Decodable
- mongoose
- RxSwift
- UIRefreshController
- Reduce
- ์ฑ๋ง๋ค๊ธฐ
- String.Index
- SWiFT
- DispatchQueue
- ios
- Firestore CRUD
- ์๊ณ ๋ฆฌ์ฆ
- Codable
- Mac
- Cloud Firestore
- AVAudioPlayer
- map
- Filter
- Firestore
- ์ง๋ฒ๋ณํ
Archives
- Today
- Total
๋ชฉ๋กGeneric (1)
Focus On Develop ๐ค๐ค
[Swift] AssociatedType
์๋ ํ์ธ์ ๐ ์ค๋์ AssociatedType์ ๋ํด์ ์์๋ณผ๊ฑฐ์์! ๋ง ๊ทธ๋๋ก ๊ด๋ จ๋ ํ์ ..? ์ฐ๊ด๋ ํ์ ..? ๊ทธ๋ฐ๊ฑด๋ฐ, ์ฌ์ค์ Generic์์ placeholder ํ์ ๊ฐ์๊ฑฐ์์!! ๋ฌด์จ๋ง์ด๋.. ์์๋ฅผ ๋ค์ด์ ๋ด ์๋ค์!! protocol Appendable { var collection: [String] { get set } func append(_ item: String) } class StringArray: Appendable { var collection: [String] = [] func append(_ item: String) { collection.append(item) } } Appendable์ด๋ผ๋ ์ด๋ค Array์ ๋ฐ์ดํฐ๋ฅผ ์ถ๊ฐํ ์ ์๋ ๊ธฐ๋ฅ์ ๊ฐ์ง protocol์ด ์์ด์..
iOS [Swift]/๊ธฐ์ด๋ฅผ ํํํ!
2021. 8. 23. 10:19