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.

Lifecycle

  • Declaration

    Swift

    convenience public init(scene: UIScene? = nil)

    Parameters

    scene

    An instance of UIScene to monitor states.

  • Declaration

    Swift

    public init(
        scene: UIScene? = nil,
        observationHandler: Observable
    )

    Parameters

    scene

    An instance of UIScene to monitor states.

    observationHandler

    An implementation of observer pattern.

Public

  • Instance of UIScene which state is monitored by the SceneLifecycleMonitor

    Declaration

    Swift

    public weak var scene: UIScene?
  • Add observer.

    Declaration

    Swift

    public func addObserver(_ observer: AppUIInstanceStateObservable)

    Parameters

    observer

    observer of AppUIInstanceStateObserver

  • Remove observer.

    Declaration

    Swift

    public func removeObserver(_ observer: AppUIInstanceStateObservable)

    Parameters

    observer

    observer of AppUIInstanceStateObserver