์ค์๊ฐ ์์ฑ ์คํธ๋ฆฌ๋ฐ ๊ตฌํ์ค ์ง๋ฉดํ ๋ฌธ์ ์ ๋๋ค. ์ฐ์ ์๋ฒ๋ ํด๋ผ์ด์ธํธ๊ฐ 16kHz, Int16, 30ms ๋จ์๋ก buffer๋ฅผ ์ฃผ๊ณ ๋ฐ์ผ๋ ค๊ณ ํ์์ต๋๋ค. let sampleRate: Double = 16000let frameDuration: Double = 0.03 // 100mslazy var audioFrameCount = Int(sampleRate * frameDuration) ์คํธ๋ฆฌ๋ฐ ๋ณด๋ผ๋ ๊ท๊ฒฉ์ ๋ง์ถฐ์ ๋ฆฌ์ํ๋งํ ๋ฐ์ดํฐ๋ฅผ ์ ์กํด์ฃผ์๋๋ฐ // ๋ณํ ํ ๋ฐ์ดํฐ ์ ์ฒด๋ฅผ ํ ๋ฒ์ ์ ์กlet pcmBuf = AVAudioPCMBuffer(pcmFormat: mixerFormat, frameCapacity: frameCount)!audioInputConverter?.convert(to: pcmBu..
๋ฐฐ๊ฒฝ ๋ฐ์ดํฐ๋ฅผ ํ์ด์ง ๊ตฌ์กฐ๋ก ๋ถ๋ฌ์ค๊ณ ,๊ฐ ๋ฐ์ดํฐ res๊ฐ์ ๋ํด ๋ณ๋๋ก ๋น๋๊ธฐ ์์ธ ์ ๋ณด API์ ์ถ๊ฐ๋ก ์์ฒญํ๊ณ ํ๋ฉด์ ์ถ๋ ฅํ๋ ๊ตฌ์กฐ๋ฅผ ๊ตฌํํ๋ ค ํ์ต๋๋ค. ์ฌ๋ฌ api๊ฐ ๋์์ ํธ์ถ๋์ด์ผํ๋ ์ํฉ์ ๋๋ค. ๋ฌธ์ ์์ธ๊ณผ ํด๊ฒฐ ์ฒ์์๋ ๋จ์ํ๊ฒ ๋ค์๊ณผ ๊ฐ์ ๊ตฌ์กฐ๋ก ์ฒ๋ฆฌํ์ต๋๋ค.func loadPage() async { let page = try await api.fetchPage() for item in page.items { let detail = try await api.fetchDetail(id: item.id) messages.append(detail) } listRelay.accept(messages)} ์ด๋ ๊ฒ ํธ์ถํ์์๋์ ๋ฌธ์ ์ ์์์ฒญ์ด ์์๋๋ก..
Clean Architecture ๊ธฐ๋ฐํ์ฌ๋คํธ์ํฌ๋ฅผ ์ถ์ํ, ๋ชจ๋ํํ๋ ์ฝ๋๋ฅผ ์ ๋ฆฌํ๋ ค๊ณ ํฉ๋๋ค Clean Architecture์์ ๋คํธ์ํฌ ๊ณ์ธต์ ๋ค์๊ณผ ๊ฐ์ ๋ ์ด์ด๋ก ๋๋ ์ ์์ต๋๋ค - Domain Layer: ์ฑ์ ํต์ฌ ๋น์ฆ๋์ค ๋ก์ง๊ณผ ๊ท์น์ ์ ์ํฉ๋๋ค- Data Layer: ์ธ๋ถ ๋ฐ์ดํฐ ์์ค(๋คํธ์ํฌ, ๋ฐ์ดํฐ๋ฒ ์ด์ค ๋ฑ)์์ ์ํธ์์ฉ์ ์ฒ๋ฆฌํฉ๋๋ค- Presentation Layer: UI์ ์ํธ์์ฉํ๋ฉฐ, ์ฌ์ฉ์์๊ฒ ๋ฐ์ดํฐ๋ฅผ ๋ณด์ฌ์ค๋๋ค ์ด์ค์์ network ๋ก์ง์ Data Layer์ ํฌํจ๋ฉ๋๋ค. ๋จผ์ ๋คํธ์ํฌ ์ธ์ ์ ๋์ ๊ตฌํํ๋ URLSessionWrapper๋ฅผ ์์ฑํฉ๋๋ค.import Foundationpublic protocol SessionProtocol { func ..
1. Filemanager๋ก ํ์ผ ๊ฐ์ ธ์ค๋ ๋ฐฉ๋ฒ ์ ๋๋ค. ์ฐ์ ์ฑ ์ธ๋ถ ์ ์ฅ์ ํ์ผ์ ์ ๊ทผํ๊ธฐ ์ํดkey: Supports opening documents in placevalue: yes key: Supports Document Browservalue: yes Info plist์ ๋ฑ๋กํฉ๋๋ค ๋ค์ UIDocumentPickerDelegate๋ฅผ ์ฑํํ๊ณ ํ์ผ์ ์ ํ ์๋ฃํ์๋์ api๋ฅผ ํธ์ถํฉ๋๋ค class ViewController: UIViewController { let documnetPicker: UIDocumentPickerViewController = UIDocumentPickerViewController(forOpeningContentTypes: [.spreadsheet], asCop..
API ํธ์ถ ๋ชจ๋ํ๋ฅผ ํตํด ์ฝ๋์ ์ฌ์ฌ์ฉ์ฑ์ ๋์ด๊ณ ์ ์ง๋ณด์๋ฅผ ์ฉ์ดํ๊ฒ ํ ์ ์์ต๋๋ค. ๊ธฐ์กด์๋ ์ด๋ฐ์์ผ๋ก API๋ฅผ ์์ฑํ์ฌ ํธ์ถํด์ฃผ์์ต๋๋ค //// RequsetAPI.swift// ๋ถ์ฐ ์ฌํ ๋ณต์ง ์ ๋ณด๋ฅผ ์ ๊ณตํ๋ ์ดํ// https://apps.apple.com/kr/app/id1588773594// Created by jh on 2021/09/17.//import Foundationimport Alamofirestruct fetchAPI { private init() { } static let shared = fetchAPI() func getData(numOfRows: Int, PageNo: Int, completion: @escaping (_ data: [Item])..
์ง์ค ํ์ด๋จธ ์ง๊ด์ ์ธ ํ์ด๋จธ๋ก ์ง์ค๋ ฅ์ ๋์ฌ๋ณด์ธ์.๋ฌ๋ ฅ์ ๊ธฐ๋กํ๊ณ , ์ผ๋ง๋ ์ง์คํ๋์ง ๋๋์๋ณด์ธ์. https://apps.apple.com/kr/app/id6605927206 ์ง์ค ํ์ด๋จธ์ง์ค ํ์ด๋จธ๋ ์ง์ค๋ ฅ์ ๋์ด๊ณ ์๊ฐ ๊ด๋ฆฌ๋ฅผ ์ต์ ํํ๋ ๋ฐ ๋์์ ์ฃผ๋ ํ์ ์ ์ธ ํ์ด๋จธ ์ดํ์ ๋๋ค. ๋ ์ฐฝ์ ์ธ ์ํ ํ์ด๋จธ ๋์์ธ์ ํตํด ์ฝ๊ณ ์ง๊ด์ ์ผ๋ก ์๊ฐ์ ์ค์ ํ๊ณ , ์ง์คํ ์ ์apps.apple.com 1. ์ง๊ด์ ์ธ UI๋ก ์ง์ค๋ ฅ์ ๋์ฌ๋ณด์ธ์ 2. ์ง์คํ ์๊ฐ๋ค์ ํ๋์ ์ดํด๋ณด์ธ์ 3. ํ์์ ๋ง๊ฒ ์ปค์คํฐ๋ง์ด์ฆ ํด๋ณด์ธ์ ์ง์ค ํ์ด๋จธ๋ ์ง์ค๋ ฅ์ ๋์ด๊ณ ์๊ฐ ๊ด๋ฆฌ๋ฅผ ์ต์ ํํ๋ ๋ฐ ๋์์ ์ฃผ๋ ํ์ ์ ์ธ ํ์ด๋จธ ์ดํ์ ๋๋ค. ๋ ์ฐฝ์ ์ธ ์ํ ํ์ด๋จธ ๋์์ธ์ ํตํด ์ฝ๊ณ ์ง๊ด์ ์ผ๋ก ์๊ฐ์ ์ค์ ํ๊ณ ..
์ํฉ์ ์ด๋ ์ต๋๋ค 1. TableView์ data๊ฐ ์ง์์ ์ผ๋ก ๋ณํ๊ณ ์์ต๋๋ค.2. TableView์ ํน์ index๋ง update ํด์ฃผ๋ ค๊ณ ํฉ๋๋ค. (์ค์ ๋ก๋ ๋น๋๊ธฐ ์์ ์ updateํด์ฃผ๋ ์ํฉ) ์ ๊ฐ ๊ฒช์ ๋ฌธ์ ๋ @objc func buttonPressed() { // ๋ฒํผ ๋๋ ์๋ data ๋ณ๊ฒฝ ์ด์ ๋๋ ์ดํ ํ ์ด๋ธ๋ทฐ ์ ๋ฐ์ดํธ ๋๋๋ก DispatchQueue.main.async { self.tableView.reloadRows(at: [IndexPath(row: 3, section: 0)], with: .automatic) } self.dataArray = ["1","2","3","4","5","6"] } s..
TableView์์ ์ ํ๋ cell์ ์ต์์ layer๋ก ๊ฐ์ ธ์ค๋ ๋ฐฉ๋ฒ์ ๋๋ค. ์ฐ์ cell์ ์ ์ํ ๋, selectedIndex(์ ์ญ๋ณ์)๋ก cell์ ๊ตฌ๋ถํด์คฌ์ต๋๋ค. func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { if indexPath.row == selectedIndex { let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) cell.layer.zPosition = 1 return cell } el..
UIPageViewController๋ฅผ ๊ตฌํํ๋ ์ค view.addSubview(navigationView)addChild(pageViewController)view.addSubview(pageViewController.view) ๊ฐ ์ปดํฌ๋ํธ1. navigationView(UIView type)2. pageViewController(UIViewController type) ๋ฅผ ํ๋ฉด์ ์ถ๊ฐํ๋ ๋ถ๋ถ์ ์์ด์์ฐจ์ด์ ์ด ์๋ค๋๊ฒ์ ์๊ฒ๋์์ต๋๋ค. addSubview(_:)๋ UIView์ subview๋ฅผ ์ถ๊ฐํ๋ ๋ฉ์๋์ ๋๋ค.UIView ํํ๋ฅผ ์ถ๊ฐํ ๋ ์ฌ์ฉํ๊ตฌ์. 1. sub ๋ทฐ๋ parent ๋ทฐ์ ์ขํ๊ณ๋ฅผ ๋ฐ๋ฅด๋ฉฐ2. parent ๋ทฐ๊ฐ ์ด๋ํ๊ฑฐ๋ ํฌ๊ธฐ๊ฐ ๋ณ๊ฒฝ๋๋ฉด sub ๋ทฐ ๋ํ ๋ณ๊ฒฝ๋๋ค ๋ ํน์ง์ ๊ฐ์ง๊ณ ..
์ดํ์ ์คํํ ๋ ํน์ ๋ฒ์ ๋ณด๋ค ๋ฎ์ ๊ฒฝ์ฐ์ ๋ฐ์ดํธ๋ฅผ ๊ฐ์ ๋ก ์๊ตฌํ๋ฉฐ ์ฑ์คํ ์ด๋ก ํ์ด์ง๋ฅผ ๋์ฐ๋๋ก ํ๋ ์์ ๊ตฌํ์ค ์๊ธด ๋ฌธ์ ์ ๋๋ค. ์ฒ์์ ๋ฒ์ ์ String ๋ฌธ์์ด์ ๋น๊ต ์ฐ์ฐ์๋ฅผ ํตํด ์์ ์ ํตํด ์ดํ ์ต์ ๋ฒ์ ๋ณด๋ค ๋์์ง ํ๋จํ์์ต๋๋ค. ๋ง์ฝ ํ์ฌ ์ดํ ๋ฒ์ ์ด 1.0.9์ดํ ์ต์ ๋ฒ์ 1.0.6 ์ผ ๊ฒฝ์ฐ "1.0.9" > "1.0.6" // true์ด๋ฌ๋ฉด ํ์ฌ ๋ฒ์ ์ด ์ดํ ์ต์๋ฒ์ ๋ณด๋ค ๋๋ค๊ณ ํ๋จ๋์ด ์ ๋ฐ์ดํธ ํ์ง ์์๋ ๋ฉ๋๋ค. ํ์ง๋ง ๋ง์ฝ ํ์ฌ ์ดํ ๋ฒ์ ์ด "1.0.10" ์ผ ๊ฒฝ์ฐ"1.0.10" > "1.0.6" // false ์ด๋ฐ์์ผ๋ก false ๊ฐ ๋๋ฏ๋ก ์ฑ์คํ ์ด๋ก ์ฐ๊ฒฐํ๊ฒ ๋ฉ๋๋ค. ์ด๋ฐ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํด์ฃผ๊ธฐ ์ํด์'Compare' ๋ผ๋ String ๋ด๋ถ์ method๋ฅผ ์ฌ์ฉํ ์ ..
- Total
- Today
- Yesterday
- ๋น๋๊ธฐ ํ์ด์ง swift
- ios gitignore
- chatgpt rag llm
- ๋ ๋์ธ์ด
- concurrency pagination
- rag llm pdf
- rag๊ธฐ๋ฐ ์ฑ๋ด
- rag๊ธฐ๋ฐ ai
- ์๋์ํํธ ๋ ์ด์ธ์ด
- ๋ ๋์ธ์ด ์ดํ
- ๋น๋๊ธฐ ๋ฆฌ์คํธ swift
- rag ๊ธฐ๋ฐ llm
- swift filemanager get excel
- ๊ณต๋ถ ํ์ด๋จธ ์ดํ
- rag ์ฑ๋ด
- rag ์์ฑํ ai
- swift get excel
- swift ์์ ๊ฐ์ ธ์ค๊ธฐ
- rag ์์
- llm rag
- llm pdf rag
- swift git ignore
- readysay
- rag ai
- swift ์๊ฐ
- swift excel read
- llm csv
- filemanager excel read
- swift filemanager excel
- swift ์์ ์ฝ๊ธฐ
| ์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
|---|---|---|---|---|---|---|
| 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 |