title: Storing UIColors in NSDictionary and retrieving them?
body: <p>I need to return a specific UIColor for a given index.<br>
  I am trying to basically store the UIColors as NSArrays</p>
  
  <blockquote>
    <p>TypeColors = [[NSDictionary alloc] initWithObjectsAndKeys:</p>
    
    <p><strong>@"1"</strong>, [NSArray arrayWithObjects:[NSNumber numberWithFloat:0.5],[NSNumber numberWithFloat:0.5],[NSNumber
    numberWithFloat:0.5],[NSNumber numberWithFloat:1.0], nil],</p>
    
    <p><strong>@"5"</strong>, [NSArray arrayWithObjects:[NSNumber numberWithFloat:1.0],[NSNumber
    numberWithFloat:0.5],[NSNumber numberWithFloat:0.1],[NSNumber
    numberWithFloat:1.0], nil]
                        , nil]; //nil to signify end of objects and keys.</p>
  </blockquote>
  
  <p>And here I want to retrieve the UIColor back from that dictionary:</p>
  
  <pre><code>a = 5;
  NSArray* colorArray = [TypeColors objectForKey:a];
  UIColor* color = [UIColor colorWithRed:[colorArray objectAtIndex:0]
  green:[colorArray objectAtIndex:1] blue:[colorArray objectAtIndex:2] 
  alpha:[colorArray objectAtIndex:3]];
  </code></pre>
  
  <p>It always returns me a zero, anyone knows why?
  Thanks!</p>