Created
November 10, 2015 03:47
-
-
Save igroomgrim/c0075b6137c8b2e71e79 to your computer and use it in GitHub Desktop.
Example write Realm object to db
This file contains 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
let task = TDTask() | |
task.title = titleTextField.text! | |
task.taskDescription = descriptionTextView.text | |
let realm = try! Realm() | |
realm.beginWrite() | |
realm.add(task) | |
try! realm.commitWrite() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment