why deepstreamHub? compare us getting started faq
use cases
products
developers
company
blog contact

An AnonymousRecord is a record without a predefined name. It acts as a wrapper around an actual record that can be swapped out for another one whilst keeping all bindings intact.

This is useful to easily populate user-interface with data choosen from a list of entries.

Learn more about AnonymousRecords in this tutorial

Methods

name()

class func name() -> String

Returns the name of the underlying record the anonymous record is bound to.

setName(_:)

setName(_ recordName: String) -> Self
argument type description
recordName String The name of the underlying record to use

Sets the underlying record the anonymous record is bound to. Can be called multiple times.

anonymousRecord.setName('person/bob')

addRecordNameChangedListener(_:)

addRecordNameChangedListener(_ listener: AnonymousRecordNameChangedListener) -> Self
argument type description
listener AnonymousRecordNameChangedListener The listener to add

Add a callback to be notified whenever setName(String) is called.

anonymousRecord.addRecordNameChangedListener(...)

removeRecordNameChangedCallback(_:)

removeRecordNameChangedCallback(_ listener: AnonymousRecordNameChangedListener) -> Self
argument type description
listener AnonymousRecordNameChangedListener The listener to remove

Remove a previously registered AnonymousRecordNameChangedListener

anonymousRecord.removeRecordNameChangedCallback(...)