[SwiftUI] TabView page indicator ์ปค์Šคํ…€ํ•˜๊ธฐ
ยท
๐ŸŽ Dev/๊ตฌํ˜„
์ด๋ฏธ์ง€ ์Šฌ๋ผ์ด๋“œ๋ทฐ๋ฅผ ๋งŒ๋“ค์–ด์•ผ ํ–ˆ๋Š”๋ฐ, ํŽ˜์ด์ง€ ์ธ๋””์ผ€์ดํ„ฐ๊ฐ€ ์• ํ”Œ์ด ์ œ๊ณตํ•ด์ฃผ๋Š” ๊ธฐ๋ณธ ์ธ๋””์ผ€์ดํ„ฐ๊ฐ€ ์•„๋‹ˆ๋ผ ์ปค์Šคํ…€์„ ํ•ด์•ผํ–ˆ๋‹ค. ์ฐธ๊ณ ๋กœ ์ธ๋””์ผ€์ดํ„ฐ๋Š” ์œ„์™€ ๊ฐ™์€ ๋ทฐ๊ฐ€ ์žˆ๋‹ค๋ฉด, ์ด๋ฏธ์ง€์˜ ์ˆœ์„œ๋ฅผ ๋‚˜ํƒ€๋‚ด์ฃผ๋Š” ๋ถ€๋ถ„์— ํ•ด๋‹นํ•œ๋‹ค. ํ”ผ๊ทธ๋งˆ์— ์˜ฌ๋ผ์™€ ์žˆ๋Š” ์ธ๋””์ผ€์ดํŠธ ๋””์ž์ธ์ด ํ˜„์žฌ ์ด๋ฏธ์ง€์˜ ์ˆœ์„œ์ผ ๊ฒฝ์šฐ ์ธ๋””์ผ€์ดํ„ฐ ํ˜•ํƒœ๊ฐ€ ๋ฐ”๋€Œ๋Š” ๋””์ž์ธ์ด์—ˆ๋‹ค. ๋”ฐ๋ผ์„œ, ๋””์ž์ธ ๊ฐ€์ด๋“œ๋ฅผ ์ถฉ์กฑ์‹œํ‚ค๊ธฐ ์œ„ํ•ด์„œ SwiftUI์—์„œ Tabview๊ฐ€ ์ œ๊ณตํ•ด์ฃผ๋Š” ์›ํ˜• ์ธ๋””์ผ€์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜๊ฐ€ ์—†์—ˆ๊ณ , custom ํ˜•์‹์œผ๋กœ ์ง์ ‘ ๊ตฌํ˜„ํ•ด์•ผํ–ˆ๋‹ค.    ๋‚ด๊ฐ€ ๊ตฌํ˜„ํ•ด์•ผ ํ•˜๋Š” ๊ฒƒ: 1. ์ด๋ฏธ์ง€ ์Šฌ๋ผ์ด๋”2. ์ผ์ •์‹œ๊ฐ„ ๊ฐ„๊ฒฉ์„ ๋‘๊ณ  ์Šฌ๋ผ์ด๋”์˜ ์ด๋ฏธ์ง€๊ฐ€ ๋ฐ”๋€Œ์–ด์•ผ ํ•จ3. ์ด๋ฏธ์ง€๊ฐ€ ๋ฐ”๋€” ๋•Œ, ํ•ด๋‹น ์ด๋ฏธ์ง€ ์ˆœ์„œ์˜ ์ธ๋””์ผ€์ดํ„ฐ ๋ชจ์–‘์ด ์›ํ˜•์—์„œ ๊ฐ€๋กœ๋กœ ๊ธด ํƒ€์›ํ˜•์œผ๋กœ ๋ณ€๊ฒฝ๋˜์–ด์•ผ ํ•จ     ๊ทธ๋ž˜์„œ..
[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..