Coordinator Pattern ๊ฐœ๋… + ๊ฐ„๋‹จํ•œ ์˜ˆ์‹œ

Coordinator ํŒจํ„ด์„ ๋งŒ๋“  ์‚ฌ๋žŒ์ด ์ž‘์„ฑํ•œ ์ œ์ž‘ ์ด์œ ์™€ ๊ฐœ๋… ์†Œ๊ฐœ ์ž…๋‹ˆ๋‹ค. https://khanlou.com/2015/01/the-coordinator/ ์“ฐ์ž„์ด๋‚˜ ์ฝ”๋“œ๋ฅผ ๋ณด๊ธฐ์— ์•ž์„œ ์–ด๋–ค ๊ฐœ๋…(์–ด๋–ค ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ• ๋ ค๊ณ )์œผ๋กœ ๋งŒ๋“ค์—ˆ๋Š”์ง€ ์„ค๋ช…๋˜์–ด ์žˆ๋„ค์š” Coordinator ํŒจํ„ด์ด๋ž€ ์—ฌ๋Ÿฌ VC๊ฐ„ Navigation์˜ ์ด๋™์ด๋‚˜ ๋ฐ์ดํ„ฐ, ์ด๋ฒคํŠธ์˜ ์ „๋‹ฌ์„ ๊น”๋”ํ•˜๊ณ  ๋ถ„๋ฆฌ๋œ ๋ฐฉ์‹์œผ๋กœ ๊ด€๋ฆฌํ•˜๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค. ๊ฐ VC๋Š” Coordinator ์™€ ์—ฐ๊ฒฐ๋˜์–ด์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ž˜์„œ Coordinator๋ฅผ VC๊ฐ„ ์ค‘์žฌ์ž ์—ญํ• ์„ ํ•˜๊ณ  present์™€ dismiss๋ฅผ ์ œ์–ดํ•˜๋Š” ์—ญํ•  (ํ”„๋กœํ† ์ฝœ)๋กœ ๋ด๋„ ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค ๊ฐ„๋‹จํ•œ ์˜ˆ์‹œ์ž…๋‹ˆ๋‹ค. (์œ„ 3๊ฐ€์ง€๋ฅผ ์ ์šฉ) Home VC์—์„œ ํƒญํ–ˆ์„๋•Œ Detail VC๋กœ ๋„˜์–ด๊ฐ€๋Š” ํ™”๋ฉด์ „ํ™˜์„ Coordi..

iOS & swift 2023. 11. 20. 16:50