Last active
June 23, 2020 01:34
-
-
Save aheze/18639b4ab4fb3f3973d7aab99a3c41a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class SceneDelegate: UIResponder, UIWindowSceneDelegate { | |
| ... | |
| lots more code | |
| ... | |
| func sceneDidBecomeActive(_ scene: UIScene) { | |
| // Called when the scene has moved from an inactive state to an active state. | |
| // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. | |
| print("scene is now active!") | |
| } | |
| func sceneWillResignActive(_ scene: UIScene) { | |
| // Called when the scene will move from an active state to an inactive state. | |
| // This may occur due to temporary interruptions (ex. an incoming phone call). | |
| print("scene is now inactive!") | |
| } | |
| func sceneDidEnterBackground(_ scene: UIScene) { | |
| // Called as the scene transitions from the foreground to the background. | |
| // Use this method to save data, release shared resources, and store enough scene-specific state information | |
| // to restore the scene back to its current state. | |
| print("scene is now in the background!") | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment