์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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
- Figma
- Codable
- Mac
- UIRefreshController
- ์ฑ๋์์ธ
- mongoose
- Decodable
- Cloud Firestore
- ํ๋ก๊ทธ๋๋จธ์ค
- Firestore CRUD
- CRUD
- Core Data
- components
- ios
- ์๊ณ ๋ฆฌ์ฆ
- RxSwift
- Reduce
- AVAudioPlayer
- Encodable
- map
- SWiFT
- MongoDB
- Filter
- nodejs
- ์ฑ๋ง๋ค๊ธฐ
- Firestore
- String.Index
- DispatchQueue
- ์ง๋ฒ๋ณํ
- ExpressJS
Archives
- Today
- Total
๋ชฉ๋กProtocol (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