๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ 119

[ iOS ] Entry Point (initial view controller)

Entry PointEntry Point๋Š” ์ง„์ž…์ ์ด๋ผ๋Š” ๋œป์œผ๋กœ, ํ•œ ์Šคํ† ๋ฆฌ๋ณด๋“œ์—์„œ ์‹œ์ž‘ scene์ด ๋˜๋Š” view controller๋ฅผ ์„ค์ •ํ•  ๋•Œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ์ฆ‰, ์—ฌ๋Ÿฌ view controller ์ค‘์—์„œ initial view controller๋ฅผ ์„ค์ •ํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์•ฑ์€ ์—ฌ๋Ÿฌ ์Šคํ† ๋ฆฌ๋ณด๋“œ๋ฅผ ๊ฐ€์งˆ ์ˆ˜ ์žˆ๋Š”๋ฐ, ๊ฐ ์Šคํ† ๋ฆฌ๋ณด๋“œ๋Š” ์‹œ์ž‘ ํ™”๋ฉด์ด ๋  view controller๊ฐ€ ์ง€์ •๋˜์–ด ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด ์•ฑ ์‹คํ–‰ ์‹œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.EntryPoint ๋ฏธ์„ค์ • ์˜ค๋ฅ˜Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set? UI..

iOS 2024.12.25

[ Accessibility ] "์„ ํƒ๋จ" ์•ˆ๋‚ด ๋ฉ”์‹œ์ง€ ์ œ๊ฑฐํ•˜๊ธฐ (accessibilityTraits)

๋ฐฐ๊ฒฝCollectionView ๋˜๋Š” TableView(์ดํ•˜ List ์ปดํฌ๋„ŒํŠธ)์—์„œ select ๋™์ž‘ ์‹œ ํ•ด๋‹น ์•„์ดํ…œ์˜ ์ƒํƒœ๊ฐ€ “์„ ํƒ”์œผ๋กœ ์„ค์ •๋˜์–ด ๋™์ž‘ ๋ฐ ํ™•์ธ ์‹œ VoiceOver ์Œ์„ฑ์œผ๋กœ “์„ ํƒ๋จ”์ด ์ถœ๋ ฅ๋ฉ๋‹ˆ๋‹ค.      ์ ‘๊ทผ์„ฑ ๋ฌธ์ œ์˜ ์›์ธApple์˜ ์˜๋„๋Š” ์•„์ดํ…œ์ด ์„ ํƒ๋˜์—ˆ์œผ๋‹ˆ๊น ํ•ด๋‹น ์•„์ดํ…œ์˜ ์ƒํƒœ๋ฅผ ์ถœ๋ ฅํ•ด ์ •ํ™•ํ•œ ์•ˆ๋‚ด๋ฅผ ํ•ด์ฃผ๊ณ ์ž ํ•จ์ด์ง€๋งŒ, ์ด๋Ÿฌํ•œ ์•ˆ๋‚ด๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋™์ž‘์— ๋Œ€ํ•œ ํ˜ผ๋™:“ํ•ด์ œ๋จ”์ด๋ผ๋Š” ๋ฐ˜๋Œ€ ๊ฐœ๋… ์กด์žฌ ์ธ์‹. (์˜ˆ, ์•ฝ๊ด€ ๋™์˜)์ถ”๊ฐ€ ๊ธฐ๋Šฅ ์กด์žฌ ์ธ์‹ (์˜ˆ, ์•จ๋ฒ” - ์‚ฌ์ง„ ์„ ํƒ, ์‚ฌ์ง„ ๋ชจ์•„ ๋ณด๋‚ด๊ธฐ)   ๊ตฌํ˜„ ๋ฐฉ๋ฒ•์ด "์„ ํƒ๋จ"์€ accessibilityTraits๊ฐ€ .selected ๋กœ ์„ค์ •๋˜์–ด ์ถœ๋ ฅ๋˜๋Š” ๊ฒƒ์œผ๋กœ, accessibilityTraits ์„ค์ •์„ ํ†ตํ•ด ..

iOS/Accessibility 2024.12.18

[ iOS ์‹œํ–‰์ฐฉ์˜ค ] MVC ์•„ํ‚คํ…์ฒ˜ ํŒจํ„ด์„ ์ ์šฉํ•ด๋ณด์ž

๐Ÿค” ๋ฐฐ๊ฒฝ & ๋ฌธ์ œ์— ์—…๋ฐ์ดํŠธ๋ฅผ ์ง„ํ–‰ํ•  ์ˆ˜๋ก ๋ถ„๋ช…ํ•˜์ง€ ์•Š์€ ์ฝ”๋“œ ๊ธฐ์ค€์ด ํ”„๋กœ์ ํŠธ ๊ฐ€๋…์„ฑ ๋‚ฎ์ถ”๊ณ  ์žˆ์Œ์„ ์•Œ๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๋”๋ถˆ์–ด ์ผ๋ฐ˜ํ™”๋˜์ง€ ์•Š์€ View ๊ตฌํ˜„์œผ๋กœ, ์‚ฌ์šฉ์ž ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์ผ๊ด€๋˜๊ฒŒ ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๋น„ํšจ์œจ์ ์ธ ๋ฐ˜๋ณต ์ž‘์—…์ด ์žˆ์–ด์•ผ ํ–ˆ์Šต๋‹ˆ๋‹ค. ๋”๋ถˆ์–ด ๋‚ด์šฉ ๊ฒฐํ•ฉ๋„๋ฅผ ๊ฐ€์ง„ BottomMenuViewController์™€ ๊ฐ™์ด, ๊ฐ์ฒด ๊ฐ„ ๊ฒฐํ•ฉ๋„๊ฐ€ ๋†’์•„ ๊ธฐ๋Šฅ ๋ณ€๊ฒฝ ๋ฐ ๊ฐœ์„  ์‹œ ์ง„ํ–‰์˜ ์–ด๋ ค์›€์ด ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. (๋‚ด์šฉ ๊ฒฐํ•ฉ๋„: ๊ฐœ์ฒด ๊ฐ„ ์ธํ„ฐํŽ˜์ด์Šค ์—†์ด ๋‚ด๋ถ€์— ์ง์ ‘ ์ ‘๊ทผํ•ด ๋ฐ์ดํ„ฐ๋ฅผ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ๋Š” ๊ด€๊ณ„) ๐Ÿ•ต๏ธ ๋ฌธ์ œ ํ•ด๊ฒฐ๋ฒ•์•„ํ‚คํ…์ฒ˜ ํŒจํ„ด์„ ๋„์ž…ํ•ด, ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ์‹œ์Šคํ…œ ๊ตฌ์กฐ์™€ ์—ญํ• ์„ ๋ช…ํ™•ํžˆ ํ•˜์—ฌ ํ”„๋กœ์ ํŠธ์˜ ๊ฐ€๋…์„ฑ์„ ํ–ฅ์ƒ์‹œํ‚ค๊ณ  ๊ฐœ์ฒด ๊ฐ„ ์ ์ ˆํ•œ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์ ์šฉํ•˜์—ฌ ๊ฒฐํ•ฉ๋„๋ฅผ ๋‚ฎ์ถ”๊ธฐ๋กœ ๊ฒฐ์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. ํŠนํžˆ View์˜ ์ผ๋ฐ˜ํ™”์— ์ง‘์ค‘..

[ iOS ์‹œํ–‰์ฐฉ์˜ค ] CollectionView์— Cell์ด ํ•˜๋‚˜๋งŒ ๋ณด์ด๋Š” ์ด์œ 

๐Ÿ‘ฉ‍๐Ÿ’ป๋ฐฐ๊ฒฝ๐Ÿ‘ฉ‍๐Ÿ’ปChapterList๋ฅผ ๊ฐœ๋ฐœํ•˜๋˜ ์ค‘, ๋ถ„๋ช… item์ด 3๊ฐœ๊ฐ€ ์žˆ๋Š”๋ฐ cell์ด 1๊ฐœ๋งŒ ๋ณด์ด๋Š” ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค! ๊ทธ๋ž˜์„œ ์ด์ „์— ์ž‘์—…ํ–ˆ๋˜ BookList์—์„œ๋„ ํ™•์ธํ•ด ๋ณด๋‹ˆ ๋˜‘๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค.. BookList์—์„œ๋Š” item์ด ํ•˜๋‚˜๋งŒ ์žˆ์—ˆ๋˜์ง€๋ผ ๋ฐœ๊ฒฌํ•˜์ง€ ๋ชปํ–ˆ๋˜ ๊ฒƒ ๊ฐ™๋‹ค. ๋ถ„๋ช… BookList์— ๊ฐ์ฒด๊ฐ€ 3๊ฐœ๊ฐ€ ๋‹ด๊ธด ์ƒ˜ํ”Œ ๋ฐ์ดํ„ฐ๋ฅผ ์ ์šฉํ•  ๋•Œ๋งŒ ํ•ด๋„ ํ™”๋ฉด์— item๋“ค์ด ์ž˜ ๋‚˜ํƒ€๋‚ฌ๋Š”๋ฐ, ์‹ค์ œ ๋ฐ์ดํ„ฐ๋ฅผ ์ ์šฉํ•œ ๋’ค ์ž‘์—…ํ–ˆ๋˜ Section๋ณ„ UI ์ž‘์—…์—์„œ ๋กœ์ง์ด ๋ฐ”๋€Œ๋ฉด ๋ฐœ์ƒํ•œ ๊ฒƒ์œผ๋กœ ๋ณด์ธ๋‹ค. CollectionViewLayout๋ถ€ํ„ฐ DiffableDataSource๋ฅผ ๊ฑฐ์ณ Snapshot๊นŒ์ง€ ๋ฌธ์ œ๋ฅผ ์ฐพ์•„๋ณด๋Š” ๊ณผ์ •์„ ๊ธฐ๋กํ•ด๋ณด์ž~      ๐Ÿ–ผ๏ธ CollectionViewCompositionalLa..

[ iOS ] CompositionLayout ๋ฐฉํ–ฅ ์ดํ•ดํ•˜๊ธฐ

๐Ÿ“– CompositionalLayoutCollectionView์˜ CompositionalLayout์€ Section, Group, Item์œผ๋กœ ๊ตฌ์„ฑ๋˜์–ด์žˆ๋‹ค. ์—ฌ๊ธฐ์—์„œ Group์€ NSCollectionLayoutItem ์˜ ํ•˜์œ„ ํด๋ž˜์Šค์ด๊ธฐ ๋•Œ๋ฌธ์— Group ์•ˆ์— Group์ด ๋“ค์–ด๊ฐˆ ์ˆ˜๋„ ์žˆ๋‹ค.       ๐Ÿšฅ Section๊ณผ Group์˜ ๋ฐฉํ–ฅCompositionalLayout์—์„œ๋Š” Section์˜ ๋ฐฉํ–ฅ๊ณผ Group์˜ ๋ฐฉํ–ฅ์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๋‹ค. Group์˜ item ๋ฐฐ์น˜ ๋ฐฉํ–ฅ์€ .vertical๊ณผ .horizontal ๋ฉ”์„œ๋“œ๋กœ ์ง€์ •ํ•ด์ค„ ์ˆ˜ ์žˆ๊ณ , Section์˜ scroll ๋ฐฉํ–ฅ์€ UICollectionViewCompositionalLayoutConfiguration์„ ํ†ตํ•ด ์„ค์ •ํ•  ์ˆ˜ ์žˆ๋‹ค.  ์œ„ ๊ทธ๋ฆผ์„..

iOS 2024.06.27

[ iOS ] ๋ฐ์ดํ„ฐ ์œ ๋ฌด์— ๋”ฐ๋ผ CollectionView UI ๋ณ€๊ฒฝํ•˜๊ธฐ with DiffableDataSource, Snapshot

๊ธ€์„ ๊ฒŒ์‹œํ•œ ์ดํ›„ ์ฝ”๋“œ์— ๋ฌธ์ œ๊ฐ€ ์žˆ๋‹ค๋Š” ๊ฑธ ๋ฐœ๊ฒฌํ•ด ์ด๋ฅผ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค!๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ๊นŒ์ง€ ์‹œํ–‰์ฐฉ์˜ค๊ฐ€ ๊ถ๊ธˆํ•˜์‹œ๋‹ค๋ฉด ์ด ๊ธ€ ๋ด์ฃผ์„ธ์š”~ [ iOS ์‹œํ–‰์ฐฉ์˜ค ] CollectionView์— Cell์ด ํ•˜๋‚˜๋งŒ ๋ณด์ด๋Š” ์ด์œ ๐Ÿ‘ฉ‍๐Ÿ’ป๋ฐฐ๊ฒฝ๐Ÿ‘ฉ‍๐Ÿ’ปChapterList๋ฅผ ๊ฐœ๋ฐœํ•˜๋˜ ์ค‘, ๋ถ„๋ช… item์ด 3๊ฐœ๊ฐ€ ์žˆ๋Š”๋ฐ cell์ด 1๊ฐœ๋งŒ ๋ณด์ด๋Š” ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค! ๊ทธ๋ž˜์„œ ์ด์ „์— ์ž‘์—…ํ–ˆ๋˜ BookList์—์„œ๋„ ํ™•์ธํ•ด ๋ณด๋‹ˆ ๋˜‘๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค.. BookList88yhtserof.tistory.com         1๏ธโƒฃ ๊ตฌํ˜„ํ•˜๊ธฐ ์ „์— ๋จผ์ € ์•Œ์•„๋ณด๊ธฐ โ˜๏ธ ๊ตฌํ˜„ ๊ฐ„๋žต ์š”์•ฝCell๊ณผ Section, Item์„ BookList์™€ Empty ๋‘ ๊ฒฝ์šฐ๋กœ ๊ตฌ๋ถ„ํ•˜์—ฌ, ๋ฐ์ดํ„ฐ ์œ ๋ฌด๋ฅผ ํ™•์ธํ•œ ํ›„ DiffableDataSource์— Cell์„ ๋“ฑ..

iOS 2024.06.17

[ iOS ] ์ž๋™ ์ฐธ์กฐ ์นด์šดํŒ…, ARC (Automatic Reference Counting)

์ž๋™ ์ฐธ์กฐ ์นด์šดํŒ… Automatic Reference Counting Swift๋Š” ์•ฑ์˜ ๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ๋Ÿ‰์„ ์ถ”์ ํ•˜๊ณ  ๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•ด ์ž๋™ ์ฐธ์กฐ ์นด์šดํŒ…(ARC)๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค. ๋”ฐ๋ผ์„œ ๊ฐœ๋ฐœ์ž๋Š” ๋ฉ”๋ชจ๋ฆฌ ๊ด€๋ฆฌ์— ์‹ ๊ฒฝ ์“ฐ์ง€ ์•Š์•„๋„ ๋œ๋‹ค. ARC์— ์˜ํ•ด ๋” ์ด์ƒ ํ•„์š”ํ•˜์ง€ ์•Š๋Š” ์ธ์Šคํ„ด์Šค๋Š” ์ž๋™์œผ๋กœ ๋ฉ”๋ชจ๋ฆฌ์—์„œ ํ• ๋‹น ํ•ด์ œ๋˜๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. ํ•˜์ง€๋งŒ ํด๋ž˜์Šค ๋“ฑ๊ณผ ๊ฐ™์ด ์ฐธ์กฐํƒ€์ž…์˜ ๊ฒฝ์šฐ ์ฐธ์กฐ ๊ด€๊ณ„์— ์˜ํ•ด ์ž๋™ ๋ฉ”๋ชจ๋ฆฌ๊ด€๋ฆฌ๊ฐ€ ๋˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋‹ค. ์ด๋Ÿฌํ•œ ๊ฒฝ์šฐ ๋ฉ”๋ชจ๋ฆฌ๊ฐ€ ๋‚ญ๋น„๋˜๋Š”๋ฐ, ์ด๋ฅผ ๋ฉ”๋ชจ๋ฆฌ ๋ˆ„์ˆ˜(memory leak)๋ผ๊ณ  ํ•œ๋‹ค. ๊ฐ„๋‹จํ•˜๊ฒŒ ์ƒ๊ฐํ•˜๋ฉด, ์‚ฌ์šฉํ•˜์ง€๋„ ์•Š๊ณ  ์‚ฌ์šฉํ•  ์ˆ˜๋„ ์—†๋Š” ์ง์ด ๋ฐฉ ํ•œ ์ผ ์— ๊ณ„์† ์กด์žฌํ•˜๋Š” ๊ฒƒ์ด๋‹ค. ARC ์˜ ์ž‘๋™์›๋ฆฌ ํด๋ž˜์Šค์˜ ์ƒˆ๋กœ์šด ์ธ์Šคํ„ด์Šค๊ฐ€ ์ƒ์„ฑ๋  ๋•Œ, ARC๋Š” ํ•ด๋‹น ์ธ์Šคํ„ด์Šค์— ๋Œ€ํ•œ ์ •๋ณด๋ฅผ ๋ฉ”๋ชจ๋ฆฌ ์ฒญํฌ์— ํ• ๋‹น..

iOS 2024.03.27

[ iOS ] ํ™”๋ฉด ์บก์ณํ•˜๊ธฐ - UIGraphicsRenderer

๐Ÿ”ซ ๋ฌธ์ œ ๋ฐœ์ƒ iOS 17๊ฐ€ ๋ฐœํ‘œ๋˜๋ฉฐ, ์•ฑ์Šคํ† ์–ด์— ๋ฐฐํฌํ•œ ์„œ๋น„์Šค์— ํ˜น์‹œ deprecated๋œ ํด๋ž˜์Šค๋‚˜ ๋ฉ”์„œ๋“œ๊ฐ€ ์žˆ์„๊นŒ ์‹ถ์–ด ์ฐพ์•„๋ดค๋‹ค. ์ •๋ง ์•ˆํƒ€๊น๊ฒŒ๋„ '์ด๋ฏธ์ง€ ๊ณต์œ ํ•˜๊ธฐ' ๊ธฐ๋Šฅ์—์„œ ์‚ฌ์šฉํ–ˆ๋˜ UIGraphicsBeginImageContextWithOptions(_:_:_:)๊ฐ€ iOS 17.0 ๋ฒ„์ „๊นŒ์ง€๋งŒ ์ œ๊ณต๋œ๋‹ค๊ณ  ํ•œ๋‹ค... ๊ทธ๋ž˜์„œ ์–ด๋–ป๊ฒŒ ๋ฒ„์ „ ์—…์„ ํ• ๊นŒ ๊ฑฑ์ •ํ•˜๋ฉฐ ๊ณต์‹ ๋ฌธ์„œ์—์„œ Graphic, Image, Render๋ฅผ ํ‚ค์›Œ๋“œ๋กœ ๋น„์Šทํ•œ ๊ธฐ๋Šฅ์„ ํ•˜๋Š” ํด๋ž˜์Šค ๋˜๋Š” ๋ฉ”์„œ๋“œ๋ฅผ ์ฐพ์•„๋ดค๋‹ค. ๋‹คํ–‰ํžˆ ๋ฉ€์ง€ ์•Š๊ฒŒ Drawing ์นดํ…Œ๊ณ ๋ฆฌ์—์„œ UIGraphicsRenderer ํด๋ž˜์Šค๋ฅผ ๋ฐœ๊ฒฌํ–ˆ๋‹ค! ์ด์ œ ์ด ํด๋ž˜์Šค๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ iOS 17 ์ดํ›„๋ฅผ ๋Œ€์‘ํ•˜๋Š” ๋ฆฌํŒฉํ† ๋ง์„ ์‹œ์ž‘ํ•ด๋ณด์ž. ๐ŸŽจ UIGraphicsRenderer UIGraphics..

iOS 2023.12.22
728x90