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