์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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
- Encodable
- ์ฑ๋ง๋ค๊ธฐ
- mongoose
- DispatchQueue
- Firestore
- Codable
- SWiFT
- Reduce
- ์ฑ๋์์ธ
- Decodable
- ios
- ์ง๋ฒ๋ณํ
- AVAudioPlayer
- Figma
- String.Index
- ์๊ณ ๋ฆฌ์ฆ
- RxSwift
- nodejs
- ํ๋ก๊ทธ๋๋จธ์ค
- Core Data
- Filter
- ExpressJS
- MongoDB
- Mac
- Firestore CRUD
- map
- CRUD
- UIRefreshController
- components
- Cloud Firestore
Archives
- Today
- Total
๋ชฉ๋กCaseIterable (1)
Focus On Develop ๐ค๐ค
[Swift] CaseIterable
์ฝ๋๋ฅผ ์ง๋ค๋ณด๋ฉด enum ํ์ ์ผ๋ก ์ด๋ค ์ข ๋ฅ์ ์ผ์ด์ค๋ฅผ ๋์ดํ๋ ๊ฒฝ์ฐ๊ฐ ๋ง์ฃ ~? ์๋ฅผ ๋ค๋ฉด ์ด๋ฐ์์ผ๋ก์! enum Country { case korea case swiss case france case england } ๊ทผ๋ฐ ์ด๋ ๊ฒ ์ผ์ด์ค๋ ์์ฑํด๋จ๋๋ฐ, ์ฐ๋ฆฌ๋ ์ ์ผ์ด์ค์ ๋ญ๊ฐ ๋ญ๊ฐ ์๋์ง๋ ๋ชฐ๋ผ์ enum Country { case korea case swiss case france case england static var allCountry: [Country] { return [.korea, .swiss, .france, .england] } } ์ด๋ ๊ฒ property๋ฅผ ์์๋ก ์์ฑํด์ค์ผ ํ์ฃ ๐ญ ๊ทผ๋ฐ Swift 4.2๋ถํฐ๋ CaseIterable์ด๋ผ๋ ํ๋กํ ์ฝ์ ์ ๊ณตํด์ฃผ๋ฉด์, ์ ๋ฐ ์ง(?)์ ํ ..
iOS [Swift]/๊ธฐ์ด๋ฅผ ํํํ!
2021. 2. 27. 22:18