title: use of undeclared NSForegroundColorAttributeName error in iphone
body: <p>In my  i want to i'm displaying a text in text view.Also i want to change the color of some sentences in that text.When i'm using the code below i'm getting the error NSForegroundColorAttributeName undeclared and i also tried using kCTForegroundColorAttributeNamevalue but is also showing undeclared error.How to remove this error.Can any one help me please.</p>
  
  <pre><code>enter code here
  
  
  NSMutableAttributedString * string = [[NSMutableAttributedString alloc]   initWithString:@"Paint a picture together, alternating every minute (use a timer to keep track)"];
  [string addAttribute:kCTForegroundColorAttributeNamevalue:[UIColor redColor] range:NSMakeRange(0,8)];
  [string addAttribute:NSForegroundColorAttributeName value:[UIColor greenColor] range:NSMakeRange(8,10)];
  [string addAttribute:NSForegroundColorAttributeName value:[UIColor blueColor] range:NSMakeRange(10,5)];
  </code></pre>