Skip to content

Commit

Permalink
* added 1 example to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
icanzilb committed Jun 13, 2016
1 parent fa05ac4 commit 67875a8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,19 @@ var conf = Realm.Configuration()
.subscribe(Realm.rx_add(conf))
```

If you want to create yourself the Realm on a different thread than the subscription you can do that too (allows you to error handle):

```swift
[Message("hello"), Message("world")].toObservable()
.observeOn( ..you can switch threads if you want )
.subscribeNext {messages in
let realm = try! Realm()
try! realm.write {
realm.add(messages)
}
}
```

#### rx_delete()

__delete from existing realm reference)__ Delete objects from existing realm reference:
Expand Down

0 comments on commit 67875a8

Please sign in to comment.