title: Applying different attributes for different portions of an NSAttributedstring
body: <p>I know it is possible to apply attributes to an NSAttributedString.</p>
  
  <p>But how can we apply different attributes to same attributed string.</p>
  
  <p>for the string "This is an attributed text."</p>
  
  <p>How can we set a particular attribute(background color or foreground color) to "This is"
  another attribute(background color or foreground color) to "an attributed text."</p>
  
  <p>Is there any way to achieve this....?</p>
  
  <p>Also is there any way to set the background color of an NSAttributedString in iOS?</p>