Skip to content

Instantly share code, notes, and snippets.

@croossin
Created July 29, 2018 17:26
Show Gist options
  • Save croossin/124d7508faf02feee41d5512d1d67e2e to your computer and use it in GitHub Desktop.
Save croossin/124d7508faf02feee41d5512d1d67e2e to your computer and use it in GitHub Desktop.
realmNotification = MMProvidersRealm.allProviders().addNotificationBlock({[weak self] (results, change, error) in
guard let this = self, let providers = results as? [MMProvidersRealm], error == nil else { return }
// Apply some logic on providers
this.title.value = computedTitle
this.description.value = computedDescription
this.state.value = .hasData
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment