Created
September 23, 2020 21:07
-
-
Save regularberry/dc6477bd89b772ea513e7f332a89cf6f to your computer and use it in GitHub Desktop.
This file contains 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
override func viewDidDisappear(_ animated: Bool) { | |
super.viewDidDisappear(animated) | |
CLSDataStore.shared.mainAppContext.descendant(matchingIdentifierPath: [game.identifier]) { context, _ in | |
guard let activity = context?.currentActivity else { return } | |
activity.stop() | |
context?.resignActive() | |
CLSDataStore.shared.save() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment