ํจ์๋ฅผ cleanํ๊ฒ ๋ง๋๋ ๋ฐฉ๋ฒ 1. ์๊ฒ๋ง๋ค๊ธฐ 2. ๋ธ๋ก๊ณผ ๋ค์ฌ์ฐ๊ธฐ 3. ํ๊ฐ์ง ๊ธฐ๋ฅ๋ง 4. ์์ ์ ์ธ ๋ค์ด๋ฐ 5. ํจ์ ์ธ์ 6. ๋ถ์ํจ๊ณผx 7. ๋ช ๋ น์กฐํ 8. ์ค๋ฅ์์ธ 9. ๊ตฌ์กฐ์ ํ๋ก๊ทธ๋๋ฐ ์ฐ์ bad ํจ์ ์์ ๋๊ฒน์ผ๋ก ์ค์ฒฉ๋ if๋ฌธ์ผ๋ก ๋ช ํํ์ง ์์ ํ๋๊ทธ, ๋ฌธ์์ด,ํจ์ ํธ์ถ์ ํ๊ณ ์์. -> ํจ์๊ฐ ๋๋ฌด ๊ธธ๊ณ , ์ด๋ค ์ผ์ ํ๋์ง ์๊ธฐ ํ๋ฆ. 1. ์๊ฒ ๋ง๋ค๊ธฐ ํ ํจ์์ ๊ธธ์ด๋ 20์ค๋ ๊ธธ๋ค๊ณ ํ๋ค. 2. ๋ธ๋ก๊ณผ ๋ค์ฌ์ฐ๊ธฐ๋ ํ์ค์ด์ด์ผ ํ๋ค. if, else, while ๋ฌธ์ ๋ค์ด๊ฐ๋ ์ฝ๋๋ ํ์ค์ด์ด์ผํ๊ณ ๋๊ฐ ํจ์๋ฅผ ํธ์ถํด์ผํ๋ค. func rednerPageWithSetupAndTeardowns(pageData: PageData, isSuite: Bool) -> String { if (isTe..
์ ์๋ 00๋ ๋ ํ๋ฐ์ ๋งํ๋ ํ์ฌ์ ์์๋ฅผ ์ ์ํ๋ค. ํ ์ํํธ์จ์ด ํ์ฌ๊ฐ ์์๋๋ฐ ํด๋น ์ ์ฒด๋ ์ถ์์ ๋ฐ๋น ์ฝ๋๋ฅผ ๋ง๊ตฌ๋ง๊ตฌ ์งฐ๋ค๊ณ ํ๋ค. ๊ธฐ๋ฅ์ด ์ถ๊ฐ๋ ์๋ก ์ฝ๋๋ ์๋ง์ด ๋์ด๊ฐ๊ณ , ๋์ค์๋ ์์ ์ด ๋ถ๊ฐ๋ฅํ ์ ๋๋ก ์ฝ๋์ ์์ฐ์ฑ์ด 0์ ๊ฐ๊น์์ก๋ค๊ณ ํ๋ค. ์ด๋ ๊ฒ ์๊ฐ์ ๊ธ๊ธํด ๋์ถฉ ๊ตฌํ์๋ง ๋ชฉ์ ์ ๋๊ณ , ์ถํ ๊น๋ํ๊ฒ ์์ ํด์ผํ์ง ํ๋ ํ๋์ด ์ฝ๊ฒ ์ด๋ฃจ์ด์ง์ง ์๋ ๊ฒฝ์ฐ๊ฐ ๋ง๋ค. ์ด๊ฑธ leblanc's Law - "๋์ค์ ๊ฒฐ์ฝ ์ค์ง์๋๋ค" ๋ผ๊ณ ํฉ๋๋ค. ๊ทธ๋์ ์ ์๋ ์ฝ๋๋ฅผ ์์ฑํ ๋ ์ ์ด๋ถํฐ ํด๋ฆฐํ๊ฒ ์์ฑํด์ผํจ์ ๊ฐ์กฐํ๊ณ ์๋ค. ํด๋ฆฐ ์ฝ๋๋ ๋ฌด์์ธ๊ฐ 1. ๊ฐ๋ ์ฑ์ด ์ข์์ผํ๋ค. (๋ค๋ฅธ ์ด๊ฐ ์ฝ๊ธฐ์ ์ฝ๊ณ ๋ํ ์์ ๋ ์ฌ์์ผํ๋ค.) 2. ๋ฉ๋ชจ๋ฆฌ๋ญ๋น๊ฐ ์์ด์ผํ๋ค. 3. ์์กด์ฑ ์ต์ํ, API๋ ๋ช ํํ๊ฒ ์ ์ํด์ผํ..

์์ฑํ App ๊ตฌ์กฐ์ฒด import SwiftUI @main struct LandMarksApp: App { var body: some Scene { WindowGroup { ContentView() } } } @Main โ ๊ตฌ์กฐ์ฒด ์ ์ธ ์์ @main ํน์ฑ์ ๋ถ์ฌ ์ฑ์ ์ง์ ์ ์ ๋ํ๋ ๋๋ค. ์ฑ์ ํ๋์ ์ง์ ์ ๋ง ๊ฐ์ง๋๋ค. App protocol: ์ฑ์ ๊ตฌ์กฐ์ ๋์์ ๋ํ๋ด๋ ์ ํ์ ๋๋ค. โ ์ฑ ์์์ ContentView๋ฅผ ๋์ฐ๊ฒ ๋ค๋ ์๋ฏธ ContentView import SwiftUI struct ContentView: View { var body: some View { Text("Hello, world!") .padding() } } struct ContentView_Previews: PreviewP..
Struct protocol๋ก Hashable์ ์ฐ๋ ๊ฒฝ์ฐ๊ฐ ์์ต๋๋ค. import Foundation struct Landmark: Hashable, Codable { var id: Int var name: String var park: String var state: String var description: String } ์ด๋ ๊ฒ Fetchํ ๊ตฌ์กฐ์ฒด ๋ชจ๋ธ์ Hashable์ ์ฌ์ฉํ๊ธฐ๋ ํฉ๋๋ค. Hashable์ ๋ํด ์์๋ณด๊ฒ ์ต๋๋ค. https://developer.apple.com/documentation/swift/hashable Hashable | Apple Developer Documentation A type that can be hashed into a to produce an intege..
UserDefaults๋ฅผ ์ฌ์ฉํ์ฌ ๋ก๊ทธ์ธ cache ์ ๋ณด๋ฅผ ์ ์ฅํ๋ ๋ฐฉ๋ฒ์ ๋๋ค. UserDefaults๋ Local Database๋กLogin credentials, tokens ๋ฑ๊ณผ ๊ฐ์ ์๋์ ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ๊ธฐ ์ํด ์ฌ์ฉ๋ฉ๋๋ค. Local DB๋ฅผ ์ ์ฅํ๋ ๋ฐฉ์์ผ๋ก๋ CoreData๋ ์กด์ฌํฉ๋๋ค.CoreData์ Userdefaults์ ์ฐจ์ด์ ์ผ๋ก๋CoreData๋ ์ฌ๋ฌ ์์ฑ๊ณผ ๊ฐ์ฒด๊ฐ์ ๊ด๊ณ๋ฅผ ๊ฐ์ง ๋ณต์กํ ๋ฐ์ดํฐ ๋ชจ๋ธ์ ์ ์ฅํ๋๋ก ์ค๊ณ๋์ด์์ต๋๋ค. CoreData์ ์ฐจ์ด์ Userdefaults๋ ๊ฐ๋จํ string๊ฐ์ ์ ์ฅํ๋ ๋ฐ๋ฉด, CoreData์๋ array, dictionary๋ฅผ ์ ์ฅ ํ ์ ์์ต๋๋ค.Userdefaults๋ thread - safe์ด๋ฉฐ ๋ฉํฐ ์ค๋ ๋์ ๋ณ๋ค๋ฅธ ๋ฌธ์ ์์ด ์ ๊ทผํด๋ ..
HTTP ์๋ฒฝ๊ฐ์ด๋ 14์ฅ Secure HTTP๋ฅผ ์ฝ๊ณ ์ ๋ฆฌํ ๊ธ์ ๋๋ค. HTTP๋ hypertext transfer protocol http://๋๋ฉ์ธ โ๋๋ฉ์ธ์ ํด๋น๋๋ ์ปดํจํฐ์ ํต์ ์ ํ๊ณ ์ ํ๋๋ฐ http ํ๋กํ ์ฝ ์ฌ์ฉํ๊ฒ ๋ค๋ ๋ป์ ๋๋ค. ์ฌ๋๋ค์ ์ธํฐ๋ท์ ํตํด ์ค์ํ ์ ๋ณด๋ฅผ ์ฃผ๊ณ ๋ฐ์. โ๊ธฐ๋ณธ์ ์ธ ์ธ์ฆ ์ธ๊ฐ ์ธ ๋ณด์์ด ํ์ ๊ทธ๋์ ๋์จ๊ฒ HTTPS. (S๋ over secure socket layer์ ์ฝ์) ๋ณด์ ์ฅ์น๊ฐ ์ถ๊ฐ๋์์. HTTPS๋ req & res data is encrypted. SSL(Secure Sockets Layer) ๋๋ TLS(Transport Layer Security)๋ฅผ ์ฌ์ฉํ์ฌ HTTP ๊ธฐ๋ฐ์ ์ํธํ๋ ๋ณด์ ๊ณ์ธต transports-level ์ ์ ๊ณต ์ํธํ ํด๋ผ..

์ด๋ฐ ์ด๋ฏธ์ง์ ํฐ์ ๋ฐฐ๊ฒฝ์ ๋งํ์ ์ ์ฌ์ฉํ๋ ค๊ณ ํฉ๋๋ค. ๋ง์ฝ ์ฌ๊ธฐ์ ์ด๋ฏธ์ง์ width๋ง ๋์ด๋๊ฒ ๋ ๊ฒฝ์ฐ cornerRadius์ ๊ฐ์ด ์ ์ง๋์ง ๋ชปํ๊ณ ๊นจ์ง๊ฒ ๋ฉ๋๋ค. ์ด๋ฅผ Image Slicing์ Stretch ๊ธฐ๋ฅ์ผ๋ก ๋ฌธ์ ๋ฅผ ํด๊ฒฐ ํ ์ ์์ต๋๋ค. ์๋๋ก์ด๋์์๋ 9-Patch๋ผ๊ณ ํ๋๋ผ๊ตฌ์ ์ฐ์ Asset์์ ํน์ ๋ถ๋ถ๋ง ๋๋ฆฌ๊ณ ์ ํ๋ ์ด๋ฏธ์ง๋ฅผ ์ ํํด์ค ๋ค, Show Overview ๋์ ์ Editor์ Show Slicing๋ฅผ ์ฒดํฌํฉ๋๋ค. ๊ทธ๋ฌ๋ฉด ์ด๋ ๊ฒ ๊ฐ๋ก ์ธ๋ก ์์ญ์ ์ก์ ์ ์๋๋ฐ, ๊ฐ๋ก๋ง ๋์ด๊ณ ์ถ๋ค๋ฉด ๊ฐ๋ก๋ง, ๊ฐ๋ก์ธ๋ก ๋๋ค ์ก์์ ๋์ด๊ณ ์ถ๋ค๋ฉด ๋๋ค ์ ํํด์ฃผ์๋ฉด ๋ฉ๋๋ค. ๋์ด๋๊ฒ ํ๊ณ ์ถ์ ์์ญ์ ์ ์ด๋ฏธ์ง ์ฒ๋ผ ์ ํํฉ๋๋ค. ๋ง์ง๋ง์ผ๋ก ์ด๋ฏธ์ง contentMode์์ ๋์ด๋๊ฒ๋ ์์ญ์ด..

HTTP ์๋ฒฝ๊ฐ์ด๋ 7์ฅ Cache๋ฅผ ์ฝ๊ณ ์ ๋ฆฌํ ๊ธ์ ๋๋ค. ์ฐ์ Web Caching ์ด๋? HTTP ํต์ ์ response์ body ์ ํด๋นํ๋ content document๋ฅผ ๋ก์ปฌ์ ์ ์ฅํ์ฌ ํด๋น document์ ์์ฒญ์ด ์์๋ ์๋ฒ์์ response๋ก ๋ฐ๋ ๋์ ๋ก์ปฌ์์ ๊ฐ์ ธ์ค๋ ๋ฐฉ๋ฒ์ ๋๋ค. ์ฐ์ web cache์ ๋ํด ์ตํ ๊ด์ 3๊ฐ์ง์ ๋๋ค. ์บ์ฑ์ด ์ด๋ป๊ฒ ์ฑ๋ฅ์ ํฅ์ ์ํค๋์ง ์ด๋ป๊ฒ ์ต์ ์ํ์ ์บ์๋ฅผ ์ ์งํ๋์ง ์บ์ฑ๊ณผ ์๋ฒ๊ฐ์ ์ด์ฉ ๋ฐฉ๋ฒ ์ด ๊ด์ ์ ์ ์งํ๋ฉด์ ๊ธ์ ์ฝ์ด์ฃผ์๋ฉด ๋์์ด ๋ ๊ฒ ๊ฐ์ต๋๋ค. ์บ์ฑ ํ์๋์ ์ฅ์ 3๊ฐ์ง ์ ๋๋ค. ์ค๋ณต๋ ๋ฐ์ดํฐ๋ฅผ ๋ ๋ณด๋ด์ง ์์๋ ๋จ ๋คํธ์ํฌ ๋ณ๋ชฉํ์ ๊ฐ์ ๋น ๋ฅธ ๋ก๋ ์ด ์ธ๊ฐ์ง๊ฐ ๋ค ๊ฐ์ ๋งฅ๋ฝ์ด๊ธฐ๋ ํ๋ฐ. ์์ฒญ์ ๋ํ ์๋ต ํ์๋ฅผ ์ค์ด๋ฉด์ ๋ํ๋๋..

์ด๋ ๊ฒ ๋์์ด๋๊ฐ -3%์ ์์น๋ก ์๊ฐ์ ์คฌ์๋, code๋ก UILabel์ ์๊ฐ์ ์์ ํ๋ ๋ฐฉ๋ฒ์ ๋๋ค. ๋์์ด๋์ ์ฅ์์ ์ด๋ฐ ๋ํ ์ผ์ ์์ฃผ ์ค์์ ํ๊ธฐ๋๋ฌธ์ ๊ฐ๋ฐ์์ ๋์๋ ๋ณ ์ฐจ์ด๊ฐ ์๋๋ผ๋ ๊ทธ๋ฅ ๋์ด๊ฐ ์ ์์ต๋๋ค~ self.font.pointSize ๋ก UILabel๋ง๋ค ๋ค๋ฅธ font ์ฌ์ด์ฆ์ ์ ๊ทผํด์ค ์ ์์ด์. (default๋ -3%) extension UILabel { func addCharacterSpacing(_ value: Double = -0.03) { let kernValue = self.font.pointSize * CGFloat(value) guard let text = text, !text.isEmpty else { return } let string = NSMutableAt..

์์ ์ปค๋จธ์ค์์ ์์ฃผ ๋ณด์ด๋ ๋์์ธ์ธ TableView ๋ด๋ถ์ ๊ฐ๋ก ์คํฌ๋กค์ CollectionView Layout์ ๋ง๋ค์ด ๋ณด๊ฒ ์ต๋๋ค. ํ๋ง๋๋ก ์์ฝํ์๋ฉด tableViewCell์ horizotal collectionView๋ฅผ ๋ฃ์ด์ฃผ๋ฉด ๋ฉ๋๋ค. collectionView์๋ ๋น์ฐํ collectionViewCell์ ๋ฃ๊ตฌ์.. ๋จผ์ UI ๋ถํฐ ๋ณด๋ฉด ์ฐ์ tableView์ 2๊ฐ์ ์ฝ๋ ์ ๋ทฐ๋ฅผ ๋ฃ์ด์ฃผ์์ต๋๋ค. ํ๋๋ 1xN ๊ฐ๋ก ์ฝ๋ ์ ๋ทฐ์ด๊ณ ํ๋๋ 2xN ์ธ๋ก ์ฝ๋ ์ ๋ทฐ๋ฅผ ๋ฃ์ด์ฃผ์์ต๋๋ค. ์ฐ์ ์ ๋ xib๋ก ๊ฐ๊ฐ์ ์ฝ๋ ์ ๋ทฐ ์ ์ธํด์ฃผ์๊ณ , ํ๋์ ํ ์ด๋ธ๋ทฐ์ 2๊ฐ์ ์ฝ๋ ์ ๋ทฐ์ Nib์ ์ ID๋ฅผ ๋ฑ๋กํ์ฌ ์ฐ๊ฒฐํด์ฃผ์์ต๋๋ค. cell์ register์ ํด์ฃผ๊ณ , cellForRow๋ก cell์ row์ ๋ฐ๋ผ cel..
- Total
- Today
- Yesterday
- swift ๋คํธ์ํฌ ๋ชจ๋ํ
- swift network refactoring
- rag ๊ธฐ๋ฐ llm ์ฑ๋ด
- swift network ๊ณตํตํ
- filemanager excel read
- swift urlsession ๊ณตํตํ
- swift ์์ ์ฝ๊ธฐ
- swift get excel
- swift filemanager excel
- swift ์์ ๊ฐ์ ธ์ค๊ธฐ
- ๋ ๋์ธ์ด
- rag llm pdf
- ๋ ๋์ธ์ด ์ดํ
- chatgpt rag llm
- rag ๊ธฐ๋ฐ llm
- llm pdf rag
- swift urlsession network module
- swift excel read
- ์๋์ํํธ ๋ ์ด์ธ์ด
- swift urlsession refactoring
- focus timer ์ดํ
- ๊ณต๋ถ ํ์ด๋จธ ์ดํ
- readysay
- swift network module
- swift filemanager get excel
- swift queryitem encode
- swift urlsession module
- swift ์๊ฐ
- swift urlcomponent encode
- llm csv
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |