Created
September 2, 2020 13:46
-
-
Save apatronl/7103c01bf2cce5f8ddecba61847e8dcc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ContentView: View { | |
// ... | |
private func saveTodos() { | |
UserDefaults.standard.set(try? PropertyListEncoder().encode(self.allTodos), forKey: "todosKey") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment