This video will show you how to use UserDefaults to determine whether your App plays music upon opening. Very useful feature for games and other interactive apps.
Steps:
1) Create let constant for UserDefaults
and the variable you want to set
2) Set default value using function
3) Load default value in ViewDidLoad
Download the completed project: https://github.com/mgm720/UserDefaults
Check out my video on adding audio to your app here: • Play Audio in Your App in 4 Steps Usi...