๐ŸŽ ์•„์ด-์˜ค-์—์Šค/๐Ÿ“ฑ iOS ๊ฐœ๋ฐœ

[iOS] Segue: Show vs. Show Detail vs. Present Modality vs. Popover

๊ฐœ๋ฐœํ•˜๋Š” ํ›ˆ์ด 2021. 8. 24. 22:38

Segue ๋ฅผ ์„ค์ •ํ•  ๋•Œ ์ง€์ •ํ•  ์ˆ˜ ์žˆ๋Š” ์˜ต์…˜๋“ค์ธ Show, Show Detail, Present Modally, Present as Popover์˜ ์ฐจ์ด์— ๋Œ€ํ•ด ์•Œ์•„๋ด…์‹œ๋‹ค.

Show

๋ชฉ์ ์ง€ ๋ทฐ ์ปจํŠธ๋กค๋Ÿฌ๋ฅผ ๋‚ด๋น„๊ฒŒ์ด์…˜ ์Šคํƒ์— ์Œ“์Šต๋‹ˆ๋‹ค. Navigation Controller ๊ฐ€ ์„ค์ •๋˜์–ด ์žˆ์„ ๋•Œ๋Š” ๋ชฉ์ ์ง€ ๋ทฐ ์ปจํŠธ๋กค๋Ÿฌ๊ฐ€ ์˜ค๋ฅธ์ชฝ์—์„œ ์™ผ์ชฝ์œผ๋กœ ์Šฌ๋ผ์ด๋“œ ๋˜๋ฉฐ ๋‚˜ํƒ€๋‚˜๊ณ , ์ƒˆ๋กœ์šด ๋ทฐ ์ปจํŠธ๋กค๋Ÿฌ์—๋Š” ๋’ค๋กœ๊ฐ€๊ธฐ ๋ฒ„ํŠผ์ด ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค. ๋‚ด๋น„๊ฒŒ์ด์…˜ ์ปจํŠธ๋กค๋Ÿฌ๊ฐ€ ์—†์„ ๋•Œ๋Š” Present Modally๊ฐ€ ์ ์šฉ๋ฉ๋‹ˆ๋‹ค.

 

Show Detail

Show detail ์€ ์Šคํ”Œ๋ฆฟ ๋ทฐ์—์„œ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ๋‘ ๊ฐœ์˜ ํ™”๋ฉด์œผ๋กœ ๋‚˜๋ˆ„์–ด์ง„ ์Šคํ”Œ๋ฆฟ ๋ทฐ์—์„œ ๋ณด์กฐ ๋ทฐ์˜ ์ปจํŠธ๋กค๋Ÿฌ๋ฅผ ๋‹ค๋ฅธ ์ปจํŠธ๋กค๋Ÿฌ๋กœ ๋Œ€์ฒดํ•ฉ๋‹ˆ๋‹ค. ๋งŒ์•ฝ ์Šคํ”Œ๋ฆฟ ๋ทฐ๊ฐ€ ์•„๋‹ˆ๋ผ๋ฉด Present Modally๋กœ ๋ทฐ๋ฅผ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.

Present Modally

Present Modally๋Š” ๋ทฐ ์ปจํŠธ๋กค๋Ÿฌ๋ฅผ ํ™”๋ฉด ํ•˜๋‹จ์—์„œ ์ƒ๋‹จ์œผ๋กœ ๋Œ์–ด์˜ฌ๋ฆฌ๋ฉฐ ๋ชจ๋‹ฌ์„ ๋งŒ๋“ค์–ด๋ƒ…๋‹ˆ๋‹ค.

 

Popover Presentation

iPad์—์„œ ์‚ฌ์šฉํ•˜๋ฉด Popover๋ฅผ ๋„์šธ ์ˆ˜ ์žˆ๊ณ  popover ์™ธ๋ถ€์˜ ์˜์—ญ์„ ํƒญํ•˜๋ฉด popover๊ฐ€ ์ข…๋ฃŒ๋˜๋„๋ก ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. iPhone์—์„œ์˜ pop over๋Š” ๋ชจ๋‹ฌ๊ณผ ๋™์ผํ•ฉ๋‹ˆ๋‹ค.

 

์ฐธ๊ณ ์ž๋ฃŒ

 

What are the differences between segues: "show", "show detail", "present modally", "present as popover"?

What do the different segues do in Xcode 6?

stackoverflow.com