Instance Method

registerChangeObserver:

Registers an object to receive messages when objects in the photo library change.

Declaration

- (void)registerChangeObserver:(id<PHPhotoLibraryChangeObserver>)observer;

Parameters

observer

An object for receiving change messages.

Discussion

You implicitly declare interest in change messages whenever you use a fetch method (such as fetchAssetsWithOptions:) to retrieve assets or collections. After you perform a fetch, Photos automatically sends change messages whenever the objects in the resulting fetch request change—including when changes happen that add to, remove from, or reorder the list of objects in the fetch result.

See Also

Observing Changes to the Photo Library

Observing Changes in the Photo Library

Register an observer to be notified of changes to the photo library.

- unregisterChangeObserver:

Unregisters an object so that it no longer receives change messages.

PHPhotoLibraryChangeObserver

A protocol you can implement to be notified of changes that occur in the photo library.

PHChange

A description of a change that occurred in the photo library.

PHObjectChangeDetails

A description of changes that occurred in an asset or collection object.

PHFetchResultChangeDetails

A description of changes that occurred in the set of asset or collection objects listed in a fetch result.