SceneDelegate.m 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. //
  2. // SceneDelegate.m
  3. // 我的社保
  4. //
  5. // Created by jiaxian_he on 2021/4/17.
  6. //
  7. #import "SceneDelegate.h"
  8. #import "UIResponder+SPSBDelegate.h"
  9. #import "SPSBGeneralManager.h"
  10. @interface SceneDelegate ()
  11. @end
  12. @implementation SceneDelegate
  13. - (void)scene:(UIScene *)scene continueUserActivity:(NSUserActivity *)userActivity API_AVAILABLE(ios(13.0)){
  14. [self spsb_responder:scene continueUserActivity:userActivity];
  15. }
  16. - (void)scene:(UIScene *)scene openURLContexts:(NSSet<UIOpenURLContext *> *)URLContexts API_AVAILABLE(ios(13.0)){
  17. UIOpenURLContext *context = URLContexts.anyObject;
  18. [self spsb_responder:scene openURL:context.URL];
  19. }
  20. - (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions API_AVAILABLE(ios(13.0)){
  21. self.window = spsb_setKeyWindow(scene);
  22. }
  23. - (void)sceneDidDisconnect:(UIScene *)scene API_AVAILABLE(ios(13.0)){
  24. // Called as the scene is being released by the system.
  25. // This occurs shortly after the scene enters the background, or when its session is discarded.
  26. // Release any resources associated with this scene that can be re-created the next time the scene connects.
  27. // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead).
  28. }
  29. - (void)sceneDidBecomeActive:(UIScene *)scene API_AVAILABLE(ios(13.0)){
  30. // Called when the scene has moved from an inactive state to an active state.
  31. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
  32. [self spsb_didBecomeActive:scene];
  33. }
  34. - (void)sceneWillResignActive:(UIScene *)scene API_AVAILABLE(ios(13.0)){
  35. // Called when the scene will move from an active state to an inactive state.
  36. // This may occur due to temporary interruptions (ex. an incoming phone call).
  37. [self spsb_willResignActive:scene];
  38. }
  39. - (void)sceneWillEnterForeground:(UIScene *)scene API_AVAILABLE(ios(13.0)){
  40. // Called as the scene transitions from the background to the foreground.
  41. // Use this method to undo the changes made on entering the background.
  42. [self spsb_willEnterForeground:scene];
  43. }
  44. - (void)sceneDidEnterBackground:(UIScene *)scene API_AVAILABLE(ios(13.0)){
  45. // Called as the scene transitions from the foreground to the background.
  46. // Use this method to save data, release shared resources, and store enough scene-specific state information
  47. // to restore the scene back to its current state.
  48. [self spsb_didEnterBackground:scene];
  49. }
  50. @end