RBObserverCollection Class Reference

Inherits from NSObject
Declared in RBObserverCollection.h

Overview

A weak or strong collection of observer delegates.

  delegate

A delegate to be informed of collection events.

@property (nonatomic, weak, nullable) id<RBObserverCollectionDelegate> delegate

Discussion

A delegate to be informed of collection events.

Declared In

RBObserverCollection.h

  observerCount

The number of observers currently referenced in the collection.

@property (nonatomic, readonly) NSUInteger observerCount

Discussion

The number of observers currently referenced in the collection.

Declared In

RBObserverCollection.h

  doesRetainObservers

Whether or not the delegate observers are stored with strong references (retained).

@property (nonatomic, readonly) BOOL doesRetainObservers

Discussion

Whether or not the delegate observers are stored with strong references (retained).

Declared In

RBObserverCollection.h

– addObserver:

Add a new delegate observer to the collection.

- (void)addObserver:(nonnull id)observer

Parameters

observer

The observer object to add to the collection.

Discussion

Add a new delegate observer to the collection.

Declared In

RBObserverCollection.h

– removeObserver:

Remove a delegate observer from the collection.

- (void)removeObserver:(nonnull id)observer

Parameters

observer

The observer object to remove from the collection.

Discussion

Remove a delegate observer from the collection.

Declared In

RBObserverCollection.h

– enumerateObserversWithBlock:

Enumerates the delegate observer objects in the collection.

- (void)enumerateObserversWithBlock:(nonnull void ( ^ ) ( id __nonnull observer , BOOL *__nonnull stop ))enumerationBlock

Parameters

enumerationBlock

The enumeration block to call on each delegate observer object.

Discussion

Enumerates the delegate observer objects in the collection.

Declared In

RBObserverCollection.h

– init

Initializes a new observer collection that keeps weak references (does not retain) to its delegate observer objects.

- (nonnull instancetype)init

Return Value

The initialized observer collection object.

Discussion

Initializes a new observer collection that keeps weak references (does not retain) to its delegate observer objects.

Declared In

RBObserverCollection.h

– initWithObserverRetention

Initializes a new observer collection that keeps strong references (retains) to its delegate observer objects.

- (nonnull instancetype)initWithObserverRetention

Return Value

The initialized observer collection object.

Discussion

Initializes a new observer collection that keeps strong references (retains) to its delegate observer objects.

Declared In

RBObserverCollection.h