SceneLifecycleMonitor
public class SceneLifecycleMonitor : ApplicationLifecycleMonitoring
Implementation of AppLifecycleMonitor which takes both UIApplication and UIScene lifecycle.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Declaration
Swift
public init( scene: UIScene? = nil, observationHandler: ObservableProtocol = ObservableHandler(dispatchQueue: .main) )Parameters
sceneAn instance of UIScene to monitor states.
observationHandlerAn implementation of observer pattern.
-
Instance of UIScene which state is monitored by the
SceneLifecycleMonitorDeclaration
Swift
public weak var scene: UIScene? -
Add observer.
Declaration
Swift
public func addObserver(_ observer: AppUIInstanceStateObserver)Parameters
observerobserver of AppUIInstanceStateObserver
-
Remove observer.
Declaration
Swift
public func removeObserver(_ observer: AppUIInstanceStateObserver)Parameters
observerobserver of AppUIInstanceStateObserver
SceneLifecycleMonitor Class Reference