๐Ÿ’ป ๊ฐœ๋ฐœ 52

[iOS / Swift] URL Encoding = nil...? (URL ์ธ์ฝ”๋”ฉ์ด ๋˜์ง€ ์•Š์„ ๋•Œ)

๊ณต๊ณต๋ฐ์ดํ„ฐ ํฌํ„ธ์—์„œ ํ•œ๊ตญํ™˜๊ฒฝ๊ณต๋‹จ์—์„œ ์ œ๊ณตํ•˜๋Š” ๋Œ€๊ธฐ์งˆ ์ •๋ณด๋ฅผ ํ†ตํ•ด์„œ ๊ฐ„๋‹จํ•˜๊ฒŒ ์ธก์ •์†Œ๋ณ„ ๋Œ€๊ธฐ์งˆ ์ •๋ณด๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋Š” ์•ฑ์„ ๋งŒ๋“ค์–ด๋ณด๋ ค๊ณ  ํ–ˆ๋‹ค. ํ•œ๊ตญํ™˜๊ฒฝ๊ณต๋‹จ_์—์–ด์ฝ”๋ฆฌ์•„_์ธก์ •์†Œ์ •๋ณด ๋Œ€๊ธฐ์งˆ ์ธก์ •์†Œ ์ •๋ณด๋ฅผ ์กฐํšŒํ•˜๊ธฐ ์œ„ํ•œ ์„œ๋น„์Šค๋กœ TM ์ขŒํ‘œ๊ธฐ๋ฐ˜์˜ ๊ฐ€๊นŒ์šด ์ธก์ •์†Œ ๋ฐ ์ธก์ •์†Œ ๋ชฉ๋ก๊ณผ ์ธก์ •์†Œ์˜ ์ •๋ณด๋ฅผ ์กฐํšŒํ•  ์ˆ˜ ์žˆ๋‹ค. โ€ป ์šด์˜๊ณ„์ •์œผ๋กœ ์‚ฌ์šฉํ•˜๊ณ ์ž ํ•  ๊ฒฝ์šฐ ์—์–ด์ฝ”๋ฆฌ์•„ OpenAPI ์‚ฌ์šฉ์ž www.data.go.kr ๊ตฌํ˜„ํ•˜๋ ค๋Š” ์•ฑ์€ ์ด 3๊ฐœ์˜ ViewController๋กœ, ์ง€์—ญ๋ช…์„ ๊ฒ€์ƒ‰ํ•  ์ˆ˜ ์žˆ๋Š” ํŽ˜์ด์ง€ ํ•ด๋‹น ์ง€์—ญ์˜ ์ธก์ •์†Œ ๋ชฉ๋ก์„ ๋ณด์—ฌ์ฃผ๋Š” ํŽ˜์ด์ง€ ํŠน์ • ์ธก์ •์†Œ์˜ ๋Œ€๊ธฐ์งˆ์˜ ์ƒ์„ธ์ •๋ณด๋ฅผ ๋ณด์—ฌ์ฃผ๋Š” ํŽ˜์ด์ง€ ๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ๋‹ค. ์šฐ์„  ์ง€์—ญ๋ช…์„ ๊ฒ€์ƒ‰ํ•  ์ˆ˜ ์žˆ๋Š” ํŽ˜์ด์ง€์ธ ViewController๋ถ€ํ„ฐ ์‚ดํŽด๋ณด์ž. // // ViewControlle..

[iOS / Swift] Exception NSException * "-[UIView setText:]: unrecognized selector sent to instance

Delegate๋กœ ํŠน์ • Cell์„ ํด๋ฆญํ–ˆ์„ ๋•Œ ์ƒ์„ธ ์ •๋ณด ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•˜๋„๋ก ๊ตฌํ˜„ํ–ˆ๋‹ค. extension ViewController : UICollectionViewDelegate { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { guard let viewController = self.storyboard?.instantiateViewController(identifier: "DiaryDetailViewController") as? DiaryDetailViewController else { return } let diary = self.diaryList[indexPath.row] ..

[TIL] 22.08.25

๊ณต๋ถ€ํ•œ ๊ฒƒ ๋ถ€์ŠคํŠธ์ฝ”์Šค - iOS ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ์œ„ํ•œ ์Šค์œ„ํ”„ํŠธ ๊ธฐ์ดˆ ์•Œ๊ฒŒ๋œ ๊ฒƒ 1. ์˜ต์…”๋„ // someOptionalParm์— nil์ด ํ• ๋‹น๋  ์ˆ˜ ์žˆ์Œ func someFunction(someOptionalParam: Int?) { // .... } /// someOptionalParm์— nil์ด ํ• ๋‹น๋  ์ˆ˜ ์—†์Œ func someFunction(someOptionalParam: Int) { // .... } nil์ด ํ• ๋‹น๋  ์ˆ˜ ์žˆ๋Š”์ง€ ์—†๋Š”์ง€๋ฅผ ํ‘œํ˜„ nil์˜ ๊ฐ€๋Šฅ์„ฑ์„ ๋ช…์‹œ์ (์ฝ”๋“œ)์œผ๋กœ ํ‘œํ˜„ ๊ฐ€๋Šฅ ์˜ต์…”๋„์ด ์•„๋‹Œ ๊ฒฝ์šฐ nil ์ฒดํฌ ์—†์ด ๋ฐ”๋กœ ์‚ฌ์šฉ ๊ฐ€๋Šฅ nil๋กœ ์ธํ•œ ์˜ˆ์™ธ ์ƒํ™ฉ์„ ์ตœ์†Œํ™” 2. ์˜ต์…”๋„ ํ‘œํ˜„ ๋ฐฉ๋ฒ• // ์•”์‹œ์  ์ถ”์ถœ ์˜ต์…”๋„ var optionalValue: Int! = 10 switch optionVa..

[TIL] 22.08.24

๊ณต๋ถ€ํ•œ ๊ฒƒ ๋ถ€์ŠคํŠธ์ฝ”์Šค - iOS ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ์œ„ํ•œ ์Šค์œ„ํ”„ํŠธ ๊ธฐ์ดˆ ์•Œ๊ฒŒ๋œ ๊ฒƒ 1. ๋งค๊ฐœ๋ณ€์ˆ˜ ๊ธฐ๋ณธ ๊ฐ’ func setUserInfo(name : String, age : Int, region : String = "Deajeon") {} ํ•จ์ˆ˜๋ฅผ ์ •์˜ํ•  ๋•Œ ๋งค๊ฐœ๋ณ€์ˆ˜์— ๊ธฐ๋ณธ์ ์œผ๋กœ ์ „๋‹ฌ๋  ๊ฐ’์„ ๋ฏธ๋ฆฌ ์ €์žฅํ•  ์ˆ˜ ์žˆ์Œ ๊ธฐ๋ณธ ๊ฐ’์„ ๊ฐ–๋Š” ๋งค๊ฐœ๋ณ€์ˆ˜๋Š” ๋งค๊ฐœ๋ณ€์ˆ˜ ๋ชฉ๋ก ์ค‘ ๋งจ ๋’ค์— ์œ„์น˜ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Œ 2. ์ „๋‹ฌ์ธ์ž ๋ ˆ์ด๋ธ” // ๋‚ด๋ถ€์—์„œ๋Š” ๋งค๊ฐœ๋ณ€์ˆ˜ ์ด๋ฆ„ func greeting(to friend : String, from me : String) { print("Hello, \(friend)!, my name is \(me)") } // ํ˜ธ์ถœํ•  ๋•Œ๋Š” ์ „๋‹ฌ์ธ์ž ๋ ˆ์ด๋ธ” greeting(to : "doko", from : "kodo") ..

[iOS / Swift] unable to dequeue a cell with identifier Cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard

TableView๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด์„œ Cell์„ ์žฌ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด extension์œผ๋กœ UITableViewDataSource๋ฅผ ์žฌ์ •์˜ํ•˜๊ณ  ๋นŒ๋“œ๋ฅผ ์ง„ํ–‰ํ–ˆ๋‹ค. extension ViewController : UITableViewDataSource { func tableView(_ tableView : UITableView, numberOfRowsInSection section : Int) -> Int { return self.tasks.count } func tableView(_ tableView : UITableView, cellForRowAt indexPath : IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdenti..

[Android / Gradle] mockup1/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: AAPT: error: failed to read PNG signature: file does not start with PNG signature.

์ธํ„ด ๊ธฐ๊ฐ„ ๋™์•ˆ ๊ฐœ๋ฐœํ•œ ์•ฑ์„ ๋ฐฐํฌํ•˜๋ ค๊ณ  ์•ฑ ์•„์ด์ฝ˜ ์ด๋ฏธ์ง€๋ฅผ ์ฒจ๋ถ€ํ•˜๊ณ  Gradle์—์„œ debug -> release ๋กœ ๋ณ€๊ฒฝํ•˜๊ณ  Build Apk ๋ฅผ ๋ˆŒ๋ €๋Š”๋ฐ! ์•„๋ž˜์™€ ๊ฐ™์€ ์˜ค๋ฅ˜๊ฐ€ ๋–ด๋‹ค. mockup1/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: AAPT: error: failed to read PNG signature: file does not start with PNG signature. ์„œ์นญ์„ ํ•ด๋ณด๋‹ˆ๊นŒ Gradle ๋ฒ„์ ผ์ด ๋งž์ง€ ์•Š๋Š”๋‹ค. ๋‹ค๋ฅธ ๋ฌธ์ œ๋‹ค~ ์ด๋Ÿฐ ๊ธ€๋“ค์ด ๋งŽ์€๋ฐ ๋ญ”๊ฐ€ ์ด์ƒํ–ˆ๋‹ค. ์ง€๊ธˆ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š” ๋ฒ„์ ผ์ด 7์ธ๋ฐ 4๊นŒ์ง€ ๋‚ฎ์ถฐ์•ผํ•œ๋‹ค๊ณ ? ๊ดœํžˆ ๊ฑด๋“œ๋ ธ๋‹ค๊ฐ€ ๋‹ค๋ฅธ ์˜ค๋ฅ˜๋กœ ํ„ฐ๋ฏธ๋„์ด ํ„ฐ์งˆ ๊ฒƒ ๊ฐ™๋‹ค๋Š” ์ƒ๊ฐ์— ์ฒจ๋ถ€ํ•œ ์•ฑ ์•„์ด์ฝ˜ ์ด๋ฏธ์ง€๋ฅผ ์‚ดํŽด๋ดค๋‹ค. ํŒŒ์ผ๋ช…์€ ic..

[Flutter] ModalBottomSheet๊ฐ€ ํ‚ค๋ณด๋“œ์— ์˜ํ•ด ๊ฐ€๋ ค์ง€๋Š” ํ˜„์ƒ

๋ธ”๋กœ๊ทธ ๋‚ด์˜ ๊ฒŒ์‹œ๋ฌผ์€ PC ๋ฒ„์ „์— ์ตœ์ ํ™” ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ์˜ค๋Š˜์€ ModalBttomSheet๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด์„œ ๋ฐœ์ƒํ–ˆ๋˜ ๋ฌธ์ œ์— ๋Œ€ํ•ด ์ ์–ด๋ณด๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ModalBottomSheet์— TextField๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ‚ค๋ณด๋“œ๋กœ ์‚ฌ์šฉ์ž์˜ ์ž…๋ ฅ์„ ๋ฐ›์œผ๋ ค๊ณ  ํ–ˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ModalBottomSheet๊ฐ€ ํŒ์—…๋œ ํ‚ค๋ณด๋“œ์˜ ๋†’์ด๋งŒํผ ์˜ฌ๋ผ๊ฐ€์ง€ ์•Š์•„์„œ ModalBottomSheet๊ฐ€ ํ‚ค๋ณด๋“œ์— ๊ฐ€๋ ค์ง€๋Š” ํ˜„์ƒ์ด ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜์™€ ๊ฐ™์€ ์ƒํ™ฉ์ž…๋‹ˆ๋‹ค. ํ‚ค๋ณด๋“œ๊ฐ€ ํŒ์—…๋˜๋ฉด์„œ ModalBottomSheet๋ฅผ ๊ฐ€๋ ค ์‚ฌ์šฉ์ž๊ฐ€ ์ž…๋ ฅํ•œ ํ…์ŠคํŠธ๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์—†๋Š” ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. ModalBottomSheet๊ฐ€ ํ‚ค๋ณด๋“œ์— ์˜ํ•ด ๊ฐ€๋ ค์ง€๋Š” ํ˜„์ƒ ์šฐ์„  ModalBottomSheet์˜ ์†์„ฑ์— ๋Œ€ํ•ด ๋ถ„์„ํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋˜ ์ค‘ isScrollContro..