RKMutableBlockDictionary Class Reference
Inherits from | NSMutableDictionary |
Declared in | RKMutableBlockDictionary.h RKMutableBlockDictionary.m |
Overview
A dictionary capable of storing dynamic values provided as a Objective-C block. Otherwise identical in functionality to a vanilla NSMutableDictionary
Tasks
-
– setValueWithBlock:forKey:
Assigns a block as the value for a key in the dictionary. This allows you to implement simple logic using key-value coding semantics within the dictionary.
Instance Methods
setValueWithBlock:forKey:
Assigns a block as the value for a key in the dictionary. This allows you to implement simple logic using key-value coding semantics within the dictionary.
- (void)setValueWithBlock:(id ( ^ ) ( ))block forKey:(NSString *)key
Parameters
- block
An Objective-C block returning an id and accepting no parameters
- key
An NSString key for setting the
Discussion
When valueForKey: is invoked on the dictionary for a key with a block value, the block will be evaluated and the result returned.
Declared In
RKMutableBlockDictionary.h