Skip to content

Instantly share code, notes, and snippets.

@owenzhao
Created September 4, 2016 22:08
Show Gist options
  • Save owenzhao/55a54987296d3a267fed506acb664558 to your computer and use it in GitHub Desktop.
Save owenzhao/55a54987296d3a267fed506acb664558 to your computer and use it in GitHub Desktop.
Realm的坑(二)
let anotherBar = Foo()
anotherBar.name = bar.name
try! realm.write {
realm.add(anotherBar)
realm.delete(bar)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment