I would like to save the backgroundcolor when you close the app and start it up again. I just don't know how.
I have written it like this:
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
if self.view.backgroundColor == .blue{
self.view.backgroundColor = .red
} else if self.view.backgroundColor == .red {
self.view.backgroundColor = .blue
}
}
I just don't know how to save it when view loads.