Swift - UserDefaults (how to remember user selections) - the Swift UserDefaults class can be used to customize the user's experience. User selections can be saved on the phone or iPad as UserDefaults and the app can read in those defaults the next time the app is launched.
A database of user defaults is stored on the device. The UserDefaults are cached. Storing too much in UserDefaults might slow down your performance, but for just a few user preferences, UserDefaults is a great choice.
Graphics from OpenGameArt. Thanks Kenny.nl
https://opengameart.org/content/anima...