Created
August 8, 2011 13:51
-
-
Save seanh/1131769 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Class objects are loaded into a dictionary. | |
| factories = [NSMutableDictionary new]; | |
| [factories setObject:[SomeClass class] forKey:@"some string"]; | |
| . | |
| . | |
| . | |
| // Later, a class from the dictionary is used to init a new object. | |
| Class someClass = [factories objectForKey:someString]; | |
| id newObject = [someClass new]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment