Can somebody tell me, why I get nil, if I query
let stage = UserDefaults.standard.dictionary(forKey: "stageSelection")
my UserDefaults? There is a default vaule and I also changed the value in the settings. The settings screen is working fine - my problem is that I cannot query the selected value.
You're querying for a dictionary value, but there's only a String stored in UserDefaults
.
Use let stage = UserDefaults.standard.string(forKey: "stageSelection")