Only today I started to understand UserDefaults in Swift and the question arose, I was able to save data such as label text, variables, but I can't save the setTitle buttons. Maybe someone knows the initializer for this case? more precisely, even save it as it saves, but when I display the code when loading the application, I get an error. I’m trying to do this in this way only instead of the label, respectively, setTitle
'if let labelDef = userDefaults.object(forKey: "labelDef") { labelDisplayScene.text = labelDef as? String }'