w22116972
10/5/2014 - 10:33 AM

NSDictionary

NSDictionary


// 1.
NSDictionary *colors = @{ @"green” : [UIColor greenColor],
                          @“blue” : [UIColor blueColor],
                          @“red” : [UIColor redColor] };
NSString *colorString = ...;
UIColor *colorObject = colors[colorString];