The core methods you use to respond to life-cycle events occurring within a scene.
Scenes 내의 생명주기 이벤트에 응답에사용할 핵심 메서드들
@MainActor protocol UISceneDelegate
Use your UISceneDelegate
object to manage life-cycle events in one instance of your app's user interface. This interface defines methods for responding to state transitions that affect the scene, including when the scene enters the foreground and becomes active, and when it enters the background. Use your delegate to provide appropriate behavior when these transitions occur. For example, finish critical tasks and quiet your app when it enters the background.
Do not create UISceneDelegate
objects directly. Instead, specify the name of your custom delegate class as part of the configuration data for your scenes. You can specify this information in your app's Info.plist
file, or in the UISceneConfiguration
object you return from your app delegate's application(_:configurationForConnecting:options:)
method. For more information about how to configure scenes, see Specifying the Scenes Your App Supports.
UIScene Delegate Object를 사용하여 사용자 인터페이스의 한 인스턴스에서 생명주기 이벤트를 관리함
이 인터페이스는 Scene이 Foreground에 들어가 Active될 때와 Background에 들어갈 때를 포함하여 Scene에 영향을 미치는 상태 전환ㅔ 응답하는 method들을 정의
이러한 전환이 발생할 때 Delegate를 사용하여 적절한 동작을 제공
UIScene Delegate object를 직접 만들지마라
대신에 Scene에 대한 구성 데이터의 일부로 사용자 지정 Delegate 클래스의 이름을 지정
이 정보는 Info.plist에서 지정할 수 있음