You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
2.6 KiB

1 year ago
  1. namespace CircleViewerMac
  2. {
  3. [Register("SceneDelegate")]
  4. public class SceneDelegate : UIResponder, IUIWindowSceneDelegate
  5. {
  6. [Export("window")]
  7. public UIWindow? Window { get; set; }
  8. [Export("scene:willConnectToSession:options:")]
  9. public void WillConnect(UIScene scene, UISceneSession session, UISceneConnectionOptions connectionOptions)
  10. {
  11. // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
  12. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
  13. // This delegate does not imply the connecting scene or session are new (see UIApplicationDelegate `GetConfiguration` instead).
  14. }
  15. [Export("sceneDidDisconnect:")]
  16. public void DidDisconnect(UIScene scene)
  17. {
  18. // Called as the scene is being released by the system.
  19. // This occurs shortly after the scene enters the background, or when its session is discarded.
  20. // Release any resources associated with this scene that can be re-created the next time the scene connects.
  21. // The scene may re-connect later, as its session was not neccessarily discarded (see UIApplicationDelegate `DidDiscardSceneSessions` instead).
  22. }
  23. [Export("sceneDidBecomeActive:")]
  24. public void DidBecomeActive(UIScene scene)
  25. {
  26. // Called when the scene has moved from an inactive state to an active state.
  27. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
  28. }
  29. [Export("sceneWillResignActive:")]
  30. public void WillResignActive(UIScene scene)
  31. {
  32. // Called when the scene will move from an active state to an inactive state.
  33. // This may occur due to temporary interruptions (ex. an incoming phone call).
  34. }
  35. [Export("sceneWillEnterForeground:")]
  36. public void WillEnterForeground(UIScene scene)
  37. {
  38. // Called as the scene transitions from the background to the foreground.
  39. // Use this method to undo the changes made on entering the background.
  40. }
  41. [Export("sceneDidEnterBackground:")]
  42. public void DidEnterBackground(UIScene scene)
  43. {
  44. // Called as the scene transitions from the foreground to the background.
  45. // Use this method to save data, release shared resources, and store enough scene-specific state information
  46. // to restore the scene back to its current state.
  47. }
  48. }
  49. }