Declared in NSObject+A2DynamicDelegate.h

Overview

The A2DynamicDelegate category to NSObject provides the primary interface by which dynamic delegates are generated for a given object.

Tasks

Instance Methods

bk_dynamicDataSource

- (id)bk_dynamicDataSource
Discussion

Creates or gets a dynamic data source for the reciever.

A2DynamicDelegate assumes a protocol name FooBarDataSource for instances of class FooBar. The object is given a strong attachment to the reciever, and is automatically deallocated when the reciever is released.

If the user implements a A2DynamicFooBarDataSource subclass of A2DynamicDelegate, its implementation of any method will be used over the block. If the block needs to be used, it can be called from within the custom implementation using blockImplementationForMethod:.

Return Value

A dynamic data source.

See Also

Declared In

NSObject+A2DynamicDelegate.h

bk_dynamicDelegate

- (id)bk_dynamicDelegate
Discussion

Creates or gets a dynamic delegate for the reciever.

A2DynamicDelegate assumes a protocol name FooBarDelegate for instances of class FooBar. The object is given a strong attachment to the reciever, and is automatically deallocated when the reciever is released.

If the user implements a A2DynamicFooBarDelegate subclass of A2DynamicDelegate, its implementation of any method will be used over the block. If the block needs to be used, it can be called from within the custom implementation using blockImplementationForMethod:.

Return Value

A dynamic delegate.

See Also

Declared In

NSObject+A2DynamicDelegate.h

bk_dynamicDelegateForProtocol:

- (id)bk_dynamicDelegateForProtocol:(Protocol *)protocol
Discussion

Creates or gets a dynamic protocol implementation for the reciever. The designated initializer.

The object is given a strong attachment to the reciever, and is automatically deallocated when the reciever is released.

If the user implements a subclass of A2DynamicDelegate prepended with A2Dynamic, such as A2DynamicFooProvider, its implementation of any method will be used over the block. If the block needs to be used, it can be called from within the custom implementation using blockImplementationForMethod:.

Parameters

protocol

A custom protocol.

Return Value

A dynamic protocol implementation.

See Also

Declared In

NSObject+A2DynamicDelegate.h