#import <IView.h>
Inherited by View.
Public Member Functions | |
| (BOOL) | - hasMediator: |
| (void) | - notifyObservers: |
| (void) | - registerMediator: |
| (void) | - registerObserver:observer: |
| (id< IMediator >) | - removeMediator: |
| (void) | - removeObserver:notifyContext: |
| (id< IMediator >) | - retrieveMediator: |
In PureMVC, IView implementors assume these responsibilities:
In PureMVC, the View class assumes these responsibilities:
IMediator instances. IMediators. INotification in the application. IObservers to an INotification's observer list. INotification. IObservers of a given INotification when it broadcast.
| - (BOOL) hasMediator: | (NSString *) | mediatorName |
| - (void) notifyObservers: | (id< INotification >) | notification |
Notify the IObservers for a particular INotification.
All previously attached IObservers for this INotification's list are notified and are passed a reference to the INotification in the order in which they were registered.
| notification | the INotification to notify IObservers of. |
Reimplemented in View.
| - (void) registerMediator: | (id< IMediator >) | mediator |
Register an IMediator instance with the View.
Registers the IMediator so that it can be retrieved by name, and further interrogates the IMediator for its INotification interests.
If the IMediator returns any INotification names to be notified about, an Observer is created encapsulating the IMediator instance's handleNotification method and registering it as an Observer for all INotifications the IMediator is interested in.
| mediator | a reference to the IMediator instance |
Reimplemented in View.
| - (void) registerObserver: | (NSString *) | notificationName | ||
| observer: | (id< IObserver >) | observer | ||
| - (id<IMediator>) removeMediator: | (NSString *) | mediatorName |
| - (void) removeObserver: | (NSString *) | notificationName | ||
| notifyContext: | (id) | notifyContext | ||
Remove a group of observers from the observer list for a given Notification name.
| notificationName | which observer list to remove from | |
| notifyContext | removed the observers with this object as their notifyContext |
Reimplemented in View.
| - (id<IMediator>) retrieveMediator: | (NSString *) | mediatorName |
1.5.7.1