Created
September 4, 2016 21:58
-
-
Save owenzhao/0f63ce42104dfda26b5557c3ff39b0f9 to your computer and use it in GitHub Desktop.
Realm的坑(二)
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
class Foo:Object { | |
dynamic var name:String = "" | |
} | |
let bar = Foo() | |
let realm = try! Realm() | |
try! realm.write { | |
realm.add(bar) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment