Setup UserDefaults in Your App in 3 Steps (Swift 4)

Опубликовано: 24 Декабрь 2018
на канале: Mobile App Mike
58
0

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...