๐Ÿ“ฑ App Development Study/iOS๐ŸŽ

[Udemy iOS & Swift Bootcamp] ViewController Lifecycle

ibelieveinme 2023. 7. 5. 00:34
728x90

 

1. viewDidLoad() ํ˜ธ์ถœ.

๋ชจ๋“  IBOutlet, IBAction ๋“ฑ ๋ทฐ์™€ ๊ด€๋ จ๋œ ๋ชจ๋“  ๊ฐœ์ฒด๊ฐ€ ์—ฐ๊ฒฐ๋˜์–ด access ๊ฐ€๋Šฅ์ƒํƒœ๊ฐ€ ๋จ.

 

2. viewWillAppear() ํ˜ธ์ถœ.

ํŠน์ •  UI ์š”์†Œ๋ฅผ ๋ณด์—ฌ์ฃผ๊ฑฐ๋‚˜ ์ˆจ๊น€์ฒ˜๋ฆฌ

 

3. viewDidAppear() ํ˜ธ์ถœ

๋ทฐ๊ฐ€ ํ™”๋ฉด์— ๋‚˜ํƒ€๋‚˜์„œ ๋ณด์—ฌ์ง€๊ฒŒ ๋จ.

 

4. viewWillDisappear() ํ˜ธ์ถœ

๋’ค๋กœ๊ฐ€๊ธฐ ๋ฒ„ํŠผ์„ ๋ˆŒ๋ €์„ ๋•Œ, ๋ทฐ์—์„œ ์–ด๋–ค ํ™”๋ฉด ๋ฐ UI ์š”์†Œ๋ฅผ ์‚ญ์ œํ• ์ง€

 

5. vieDidDisappear() ํ˜ธ์ถœ

๋ทฐ๊ฐ€ ํ™”๋ฉด์—์„œ ์‚ฌ๋ผ์ง€๊ฒŒ ๋จ.

 

https://developer.apple.com/documentation/uikit/uiviewcontroller

 

728x90