[UIKit] Font ์„ค์ •ํ•˜๊ธฐ
ยท
๐ŸŽ Dev/UIKit
ํฐํŠธ ์ ์šฉ์ด๋ž€ ๊ฒƒ...๐Ÿง ์ฐพ์•„์„œ ๋”ฐ๋ผํ•˜๋ฉด ๋ณ„ ํƒˆ ์—†์ด ์ ์šฉ ๋  ๋งŒํผ ์‰ฝ์ง€๋งŒ, ์€๊ทผํžˆ ์ ์šฉ ๋‹จ๊ณ„๊ฐ€ ํ—ท๊ฐˆ๋ฆฌ๊ธฐ์— ๊ณผ๊ฑฐ ํ”„๋กœ์ ํŠธ๋ฅผ UI๋ถ€ํ„ฐ ๋ฆฌํŒฉํ† ๋ง ํ•˜๋Š” ๊น€์— ์ •๋ฆฌ๋ฅผ ํ•ด๋ณด๊ธฐ๋กœ ํ–ˆ๋‹ค. 1๏ธโƒฃ ๋ฌด๋ฃŒ ํฐํŠธ ์‚ฌ์ดํŠธ ์ด์šฉํ•˜๊ธฐ https://noonnu.cc/ https://fonts.google.com/ โž” ๋ˆˆ๋ˆ„๋‚˜ ๊ตฌ๊ธ€ ํฐํŠธ ๋“ฑ, ๋ฌด๋ฃŒ๋กœ ํฐํŠธ๋ฅผ ์ง€์›ํ•˜๋Š” ์‚ฌ์ดํŠธ์—์„œ TTF ํฐํŠธ๋ฅผ ๋‹ค์šด ๋ฐ›๊ธฐ โž” ๋ณดํ†ต ํ•œ๊ธ€ ํฐํŠธ๋Š” ๋ˆˆ๋ˆ„, ์˜์–ด ํฐํŠธ๋Š” ๊ตฌ๊ธ€! ์ธ ๋Š๋‚Œ์ด ๊ฐ•ํ•˜์ง€๋งŒ, ์ด๋ž˜์ €๋ž˜ ๋ˆˆ๋ˆ„ ํฐํŠธ๋ฅผ ์จ๋ณธ ๊ฒฐ๊ณผ... ์˜์–ด ํฐํŠธ ๋Œ€์‘๋„ ๋‚˜์˜์ง€ ์•Š์•„์„œ ํ•œ๊ตญ์–ด-์˜์–ด ๋‘˜ ๋‹ค ์‚ฌ์šฉํ•  ๋• ๋ˆˆ๋ˆ„๋งŒ ์‚ฌ์šฉํ•ด๋„ ์ถฉ๋ถ„ํ•œ๋“ฏ. 2๏ธโƒฃ Add to targets ์— ํฐํŠธ๋ฅผ ์‚ฌ์šฉํ•  ํ”„๋กœ์ ํŠธ ์ฒดํฌํ•˜๊ธฐ 3๏ธโƒฃ InfoPlist ์„ค์ • โž” Information Property..
[Error] object has been deleted or invalidated.
ยท
๐ŸŽ Dev/Issue
โš™๏ธ ํ™˜๊ฒฝ - iOS 16์ด์ƒ - Swift 5.9 - Xcode 15 ๐Ÿ’ป ๋ฌธ์ œ์ƒํ™ฉ - ๊ฐœ์ธ์•ฑ ํ”„๋กœ์ ํŠธ ์ง„ํ–‰ ์ค‘ diffableDatasource๋กœ ์ปฌ๋ ‰์…˜๋ทฐ ํ™œ์šฉํ•˜๋Š” UI๋ฅผ ์‚ฌ์šฉ ์ค‘์ด์—ˆ๊ณ , Realm์—์„œ create๋Š” ์ž˜ ๋˜๋Š”๋ฐ delete๋ฅผ ํ•˜๋ ค๊ณ  ํ•˜๋ฉด delete ํŒ์—…์ฐฝ์—์„œ ์•ฑ์ด ํ„ฐ์ง€๋ฉฐ 'object has been deleted or invalidate'๋ผ๋Š” ์˜ค๋ฅ˜๊ฐ€ CollectionView๊ฐ€ ์žˆ๋Š” VC์˜ snapshot์„ ์ฐ๋Š” ๋ถ€๋ถ„์—์„œ ๋‚ฌ๋‹ค. - '์ด๋ฏธ ์‚ญ์ œ๋œ ๊ฐœ์ฒด์ธ๋ฐ ์™œ ์ ‘๊ทผํ•ด?' ์˜๋ฏธ์˜ ์˜ค๋ฅ˜์˜€๋Š”๋ฐ, ๊ฐ์ฒด๊ฐ€ ํ•œ ๊ฐœ์ผ ๋• ๋ฌธ์ œ์—†์ด ๊ตฌํ˜„์ด ๋˜์—ˆ์œผ๋‚˜ ๋‘ ๊ฐœ ์ด์ƒ๋ถ€ํ„ฐ๋Š” ์‚ญ์ œ ์‹œ ์œ„์™€ ๊ฐ™์€ ์˜ค๋ฅ˜ ๋œจ๋ฉฐ ์•ฑ์ด ๋ฉˆ์ท„๋‹ค. โœ๏ธํ•ด๊ฒฐ๋ฐฉ์•ˆ - ์ฒ˜์Œ์—” realm๊ณผ ๊ด€๋ จ๋œ ๋ฌธ์ œ์ธ ์ค„ ์•Œ๊ณ  realm์„ ์‚ฌ์šฉํ•œ ์ฝ”๋“œ๋ฅผ ๋ชจ๋‘..
[UIKit] Enum with Reusable VC
ยท
๐ŸŽ Dev/๊ตฌํ˜„
โš™๏ธ Setting- iOS 16 ↑- Swift vesrion 5.9- Xcode version 15 ๐Ÿ”– Background Info- During the development of my first app, Zickwan, I encountered a challenge: the UI design and features of the writing and editing view controllers were identical. Creating two separate view controllers wasn't ideal for efficient memory management.  โœ๏ธ Steps- To achieve reusable views, enums proved to be a valuable tool..
[Issue] Assets์„ ์‹ค์ˆ˜๋กœ ์‚ญ์ œํ–ˆ๋‹ค๋ฉด?
ยท
๐ŸŽ Dev/Issue
๐Ÿ™ ๋ฌธ์ œ ์ƒํ™ฉ: ๋ทฐ ์ปจํŠธ๋กค๋Ÿฌ๋ฅผ ์ž˜๋ชป ๋งŒ๋“ค์–ด์„œ ์ง€์šฐ๋ ค๊ณ  ํ•˜๋‹ค๊ฐ€, ์‹ค์ˆ˜๋กœ Assets ์„ ์ง€์šฐ๊ณ  ๋ง์•˜๋‹ค. ๋จธ๋ฆฟ์†์„ ์Šค์ณ์ง€๋‚˜๊ฐ€๋Š” ๋ฉ˜ํ† ๋‹˜์˜ "Info ํŒŒ์ผ์€ ์›ฌ๋งŒํ•ด์„  ๊ฑด๋“ค์ด์ง€ ๋งˆ์„ธ์š”." ... ์ˆ˜์—…์—์„œ ์‚ฌ์šฉ์ค‘์ธ ํ”„๋กœ์ ํŠธ์ด๊ธฐ๋„ํ•˜๊ณ , ๊ณผ์ œ๋ฅผ ํ•ด๋†“์€ ๊ฒŒ ํ•จ๊ป˜ ์žˆ๋Š” ํ”„๋กœ์ ํŠธ์ด๊ธฐ๋„ ํ•ด์„œ ์ •๋ง ๋‹นํ™ฉํ–ˆ์ง€๋งŒ ๋‹คํ–‰ํžˆ! Info์™€๋Š” ๋‹ฌ๋ฆฌ Assets ๋Š” ๋ณต๊ตฌ๊ฐ€ ๊ฐ€๋Šฅํ–ˆ๋‹ค. โœ๏ธ ํ•ด๊ฒฐ๋ฐฉ์•ˆ: ๊ฐ„๋‹จํ•˜๊ฒŒ ์ •๋ฆฌํ•˜์ž๋ฉด, ํœด์ง€ํ†ต์—์„œ ๋ณต๊ตฌํ•˜์„ธ์š”. 1. ์šฐ์„  ํ”„๋กœ์ ํŠธ๋ฅผ ์„ ํƒํ•˜๊ณ , ์˜ค๋ฅธ์ชฝ ๋งˆ์šฐ์Šค๋ฅผ ๋ˆŒ๋Ÿฌ์„œ Show in Finder๋กœ ๋“ค์–ด๊ฐ€ ์ •๋ง Assets ํŒŒ์ผ์ด ์‚ฌ๋ผ์ ธ์žˆ๋Š”์ง€๋ฅผ ํ™•์ธํ•œ๋‹ค. 2. ํŒŒ์ผ์ด ์—†๋‹ค๋ฉด, ํœด์ง€ํ†ต์„ ํ™•์ธ. ์• ํƒ€๊ฒŒ ์ฐพ๋˜ Assets์ด ์žˆ์Œ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. 3. ๋‹ค์‹œ ํ”„๋กœ์ ํŠธ์˜ ํŒŒ์ผ์˜์—ญ์œผ๋กœ ๋Œ์–ด์˜ค๋ฉด ๋! ๋ณ„๋„๋กœ ์ด๋ฏธ์ง€๊ฐ€ ์ž˜ ๋“ค์–ด..
[Error] Could not insert new outlet connection
ยท
๐ŸŽ Dev/Issue
๐Ÿ’ป ๋ฌธ์ œ์ƒํ™ฉ viewController๋ฅผ ๋งŒ๋“ค๊ณ  collectionView๋ฅผ ์–น์€ ๋’ค ์•„์šธ๋ › ์—ฐ๊ฒฐ์„ ํ•ด์ฃผ๋ ค๋Š”๋ฐ ์œ„์™€ ๊ฐ™์€ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉฐ ์—ฐ๊ฒฐ์ด ๋˜์ง€ ์•Š์•˜๋‹ค. ์ฐพ์•„๋ณด๋‹ˆ ์ œ๋ฒ• ๋‹ค์–‘ํ•œ ์ƒํ™ฉ์—์„œ ๋ฐœ์ƒํ•˜๋Š” ๋“ฏ ์‹ถ์—ˆ๋‹ค. ๋ณดํ†ต ๋‘ ๊ฐ€์ง€์ธ ๊ฒฝ์šฐ ๊ฐ™์€๋ฐ, 1. xcode๋‚ด์— ํŒŒ์ผ์ด ๋งŽ์•„์„œ ์ƒ๊ธฐ๋Š” ์˜ค๋ฅ˜ 2. ๋‹จ์ˆœํ•œ ํ”„๋กœ์ ํŠธ ์˜ค๋ฅ˜ ์ฆ‰, ๊ทธ๋ƒฅ ์—‘์Šค์ฝ”๋“œ๊ฐ€ ํ˜ผ์ž ์—ฐ๊ฒฐ์„ ๋ชป ํ•˜๊ณ  ์˜ค๋ฅ˜๊ฐ€.. ๋‚˜๋Š” ๊ฒƒ ๊ฐ™์•˜๋‹ค. ๊ทธ๋ž˜์„œ ํ•ด๊ฒฐ๋ฐฉ์•ˆ๋„ ํ”„๋กœ์ ํŠธ๋ฅผ ๊ป๋‹ค ์ผœ๋‹ˆ ๋œ๋‹ค๋Š” ๊ฒŒ ๋งŽ์•˜๋Š”๋ฐ, ๋‚˜๋Š” ์™ ์ง€ ๊ป๋‹ค ์ผœ์ง€ ์•Š๊ณ  ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ํ•ด๋ณด๊ณ  ์‹ถ์–ด์„œ ์•„๋ž˜์™€ ๊ฐ™์€ ๋ฐฉ๋ฒ•์œผ๋กœ ์˜ค๋ฅ˜๋ฅผ ํ•ด๊ฒฐํ–ˆ๋‹ค. โœ๏ธํ•ด๊ฒฐ๋ฐฉ์•ˆ 1. ๋ณด๋ผ์ƒ‰ ์—ฐ๊ฒฐ์ ์ฒ˜๋Ÿผ, ๋ทฐ์ปจ์—์„œ ์—ฐ๊ฒฐ์ด ์•ˆ ๋˜๋Š” ๊ฒƒ ๊ฐ™์•„์„œ ํŒŒ์ผ์ชฝ์—์„œ ์—ฐ๊ฒฐ ํ•ด๋ดค์œผ๋‚˜ ์—ญ์‹œ ๋˜‘๊ฐ™์€ ์˜ค๋ฅ˜ ๋ฐœ์ƒ. 2. ๊ทธ๋ž˜์„œ ์ง์ ‘ @IBOutlet์„ ์ณ์„œ ์—ญ..
[Issue/UIKit] TableViewCell์— ์ถ”๊ฐ€ํ•œ ๋ฒ„ํŠผ ๊ตฌ๋ณ„ํ•˜๊ธฐ
ยท
๐ŸŽ Dev/Issue
๐Ÿ™ ๋ฌธ์ œ์ƒํ™ฉ: TableView๋ฅผ ์ด์šฉํ•ด์„œ cell์„ ๋งŒ๋“ค๋ฉด ์ข‹์€ ์ ์€ ๊ฐ™์€ ๊ฑธ ์—ฌ๋Ÿฌ ๋ฒˆ ๋ฐ˜๋ณตํ•ด์„œ ๋งŒ๋“ค ํ•„์š”๊ฐ€ ์—†๋‹ค๋Š” ๊ฒƒ์ด๊ณ , ์ƒ๊ฐํ•ด์•ผ ํ•  ๋ถ€๋ถ„์€ ๊ทธ ์ผ๊ด€ํ•˜๊ฒŒ ๋ฐ˜๋ณต๋˜๋Š” ์…€์„ ์–ด๋–ป๊ฒŒ ๊ตฌ๋ณ„ํ•  ๊ฒƒ์ธ์ง€ ๊ฐ™๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์—ฌ์ „ํžˆ indexPath์— ํ—ˆ์šฐ์  ๋Œ€๋Š” ๋‚ด๊ฐ€ ์ง๋ฉดํ•œ... TableViewCell์— ์ถ”๊ฐ€ํ•œ ๋ฒ„ํŠผ ์ค‘ ํŠน์ • index์˜ ๋ฒ„ํŠผ์— ์ด๋ฒคํŠธ๋ฅผ ์ฃผ๋ ค๋Š”๋ฐ (ํŒ์—…์ฐฝ์„ ๋งŒ๋“ค๊ณ  ์žˆ๋Š”์ค‘์ด์—ˆ๋‹ค) ์–ด์งธ์„œ์ธ์ง€ indexPathํ™œ์šฉ์ด ๋˜์ง€ ์•Š๋Š” ๊ณตํฌ. ์กฐ๊ฑด๋ฌธ์„ ๊ฐ€์žฅ ์ž์‹ ์žˆ๊ฒŒ ์“ธ ์ค„ ์•Œ์•„์„œ ์„ค๋งˆ ์กฐ๊ฑด๋ฌธ์„ ์“ฐ๋ฉด ์•ˆ๋˜๋‚˜? ํ•˜๋Š” ์ƒ๊ฐ๋ถ€ํ„ฐ ์—ฌ๋Ÿฌ ๋ฒˆ ์ˆ˜์ •์„ ํ–ˆ์ง€๋งŒ '์…€' ์•ˆ์˜ 'ํŠน์ •ํ•œ ๋ฒ„ํŠผ' ํด๋ฆญ์ด ์ž˜ ๋˜์ง€ ์•Š์•˜๋‹ค. ๊ทธ๋ ‡๊ฒŒ ์‚ฝ์งˆ์ด ์‹œ์ž‘ ๋˜์—ˆ๋‹ค.  โœ๏ธ ํ•ด๊ฒฐ๋ฐฉ์•ˆ: ๊ตฌ๊ธ€๋ง์˜ ๊ตฌ๊ธ€๋ง์˜ ๊ตฌ๊ธ€๋ง์˜ ๊ตฌ๊ธ€๋ง.... ์„ ํ•˜๋‹ค๊ฐ€ (delegate๊ณผ..