YagomCareerStarterCamp-6 / Interview-study-in-swift

1 stars 0 forks source link

[7주차] Q1_상태 변화에 따른 동작을 처리하기 위한 앱델리게이트 메서드들을 설명하시오. #19

Open Judy-999 opened 1 year ago

Judy-999 commented 1 year ago

꼬리질문

Judy-999 commented 1 year ago

applicationWillTerminate(_:)

앱이 종료되려고 할 때 delegate에게 알림


applicationWillEnterForeground(_:)

delegate에게 앱이 foreground로 진입하려 함을 알림


applicationDidBecomeActive(_:)

delegate에게 앱이 활성화(avtive)되었음을 알림


applicationWillResignActive(_:)

delegate에게 앱이 곧 비활성화될 것을 알림


applicationDidEnterBackground(_:)

앱이 background에 있음을 알림

kiwi1023 commented 1 year ago

applicationWillResignActive : active -> inactive 상태로 전환시 inactive전환 직전 실행 : 잠시 전환되는 경우

applicationDidEnterBackground : background 상태전환 직후

applicationWillEnterForeground : background -> foreground 상태로 전환시 foreground직전

applicationDidBecomeActive : active상태직후 : 화면으로 돌아올 때마다 실행

applicationWillTerminate : 앱 종료시

willFinishLaunching : didFinish전에 호출되는 함수

didFinishLaunching : 앱 실행시 1번만 실행되는 함수

seohyeon2 commented 1 year ago

답변