sladuf
200
sladuf
์ „์ฒด ๋ฐฉ๋ฌธ์ž
์˜ค๋Š˜
์–ด์ œ
  • ๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ (83)
    • ๐Ÿ“š Programming (32)
      • Swift (13)
      • JAVA (2)
      • Python (6)
      • SQL (6)
      • Web (5)
    • ๐Ÿ“ฑ iOS (25)
      • Base (7)
      • SwiftUI (9)
      • UIKit (7)
      • ์ธ๊ฐ• & ์ฑ… (2)
    • ๐Ÿ”— Algorithm (20)
      • Python (12)
      • Swift (3)
      • Tip (5)
    • ๐Ÿ—‚ ETC (6)

๋ธ”๋กœ๊ทธ ๋ฉ”๋‰ด

  • ํ™ˆ
  • ํƒœ๊ทธ
  • ๋ฐฉ๋ช…๋ก

๊ณต์ง€์‚ฌํ•ญ

์ธ๊ธฐ ๊ธ€

ํƒœ๊ทธ

  • Swift
  • ์Šค์œ„ํ”„ํŠธ

์ตœ๊ทผ ๋Œ“๊ธ€

์ตœ๊ทผ ๊ธ€

ํ‹ฐ์Šคํ† ๋ฆฌ

๊ธ€์“ฐ๊ธฐ ์„ค์ •
hELLO ยท Designed By ์ •์ƒ์šฐ.
sladuf

200

modalPresentationStyle ์„ค์ • ์‹œ์ (feat.ViewLifeCycle)
๐Ÿ“ฑ iOS/UIKit

modalPresentationStyle ์„ค์ • ์‹œ์ (feat.ViewLifeCycle)

2024. 6. 14. 02:15

 

 

 

 

์‚ฌ์ด๋“œ ํ”„๋กœ์ ํŠธ์—์„œ ํˆฌ๋ช…ํ•œ ViewController๋ฅผ ๋„์šธ ์ผ์ด ์ƒ๊ฒผ๋Š”๋ฐ, 

`modalPresentationStyle = .overFullScreen` ์„ viewDidLoad() ์‹œ์ ์— ์ž‘์„ฑํ–ˆ๋”๋‹ˆ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์—ˆ๋‹ค.

 

 

 

 

viewDidLoad()๋Š” present() ์ดํ›„์— ํ˜ธ์ถœ๋˜์–ด View๋ฅผ ๋ฉ”๋ชจ๋ฆฌ์— ๋กœ๋“œํ•˜๋Š”๋ฐ,

์•„๋งˆ present()ํ•˜๋Š” ๋‹น์‹œ์— ์ƒˆ๋กœ์šดVC๊ฐ€ ๊ฐ€์ง„ modalStyle์„ ์ ์šฉํ•˜๋Š” ๋“ฏ ํ•˜๋‹ค.

present ์—๋‹ˆ๋ฉ”์ด์…˜ ์ ์šฉํ•˜๋ ค๋ฉด ๊ทธ๋ž˜์•ผ ํ•  ๊ฒƒ ๊ฐ™๋‹ค..

 

 

๊ทธ๋ž˜์„œ presentํ•˜๊ธฐ ์ „์— modalStyle์„ ๋ณ€๊ฒฝํ•ด์ฃผ์–ด์•ผ ํ•˜๋Š”๋ฐ, ๋ณดํ†ต์€ presentํ•˜๋Š” VC์—์„œ ์„ค์ •ํ•ด์ฃผ์ง€๋งŒ,

์™ธ๋ถ€์—์„œ ํ•ด๋‹น ViewController๋ฅผ ์ปจํŠธ๋กคํ•˜์ง€ ์•Š๋„๋ก ํ•˜๊ธฐ ์œ„ํ•ด init()์‹œ์ ์— modalStyle์„ ์ ์šฉํ•ด์ฃผ์—ˆ๋‹ค.

 

 

 

 

 

viewDidLoad()๊ฐ€ ํ™”๋ฉด์— ๋ทฐ๊ฐ€ ๋…ธ์ถœ๋˜๊ธฐ์ „ ์ด๊ธด ํ•˜์ง€๋งŒ,

๊ผญ ๊ทธ๋ ‡๋‹ค๊ณ  ํ•ด์„œ ํ•ด๋‹น ํ•จ์ˆ˜์— ์„ค์ •ํ•ด์ค€ ๊ฐ’๋“ค์ด ๋ชจ๋‘ ์ •ํ™•ํ•œ ์‹œ์ ์— ์ ์šฉ๋˜๋Š” ๊ฒƒ์€ ์•„๋‹ˆ๋ผ๋Š” ๊ฒƒ์„ ๊นจ๋‹ฌ์•˜๋‹ค.

 

์•ž๋’ค ์ƒํ™ฉ์„ ์ž˜ ๊ณ ๋ คํ•ด๋ณด๊ณ  ํŒ๋‹จํ•˜์ž!

 

 

 

 

์ €์ž‘์žํ‘œ์‹œ (์ƒˆ์ฐฝ์—ด๋ฆผ)

'๐Ÿ“ฑ iOS > UIKit' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[UIKit] TableView Multiple Cell, multi type json data parsing  (0) 2023.06.27
[UIKit] CustomDatePicker ๋งŒ๋“ค๊ธฐ (3/3)  (0) 2023.04.03
[UIKit] toast message ๋งŒ๋“ค๊ธฐ  (0) 2023.02.16
[UIKit] CustomDatePicker ๋งŒ๋“ค๊ธฐ (2/3)  (0) 2023.01.08
[UIKit] CustomDatePicker ๋งŒ๋“ค๊ธฐ (1/3)  (0) 2023.01.08
    '๐Ÿ“ฑ iOS/UIKit' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€
    • [UIKit] TableView Multiple Cell, multi type json data parsing
    • [UIKit] CustomDatePicker ๋งŒ๋“ค๊ธฐ (3/3)
    • [UIKit] toast message ๋งŒ๋“ค๊ธฐ
    • [UIKit] CustomDatePicker ๋งŒ๋“ค๊ธฐ (2/3)
    sladuf
    sladuf

    ํ‹ฐ์Šคํ† ๋ฆฌํˆด๋ฐ”