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

์ฝ๋๋ฅผ ์ง๋ค๋ณด๋ฉด 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