title: Draw background color in a UILabel rect only where my text is
body: <p>I need to create a custom UILabel to display some dynamic multiline text. The text color is white on a black background. But the background should only be visible right behind the text to simulate the effect of an selected text area.</p>
  
  <p>I started with subclassing UILabel and overriding drawTextInRect to do my own drawings.</p>
  
  <pre><code>- (void) drawTextInRect:(CGRect)rect
  {
   /* do some custom drawings here */
  
   [super drawTextInRect:rect];
  }
  </code></pre>
  
  <p>So far i could not figure out a way to compute the text-bounds do draw my background into. 
  Does anybody now how do do this kind of stuff? Thanks a lot.</p>