title: draw a background color for a UILabel frame where text is present'
body: <p>I'm trying to figure out a way to get a background color of a UILabel to draw only where text is present.  I'm planning to use <strong><code>drawTextInRect</code></strong>, but i need to figure out how to track the text bounds</p>
  
  <pre><code>- (void) drawTextInRect:(CGRect)rect
  {
   /* do some custom drawings here */
  
   [super drawTextInRect:rect];
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/AheMx.png" alt="enter image description here"></p>
  
  <p>does anyone have any idea how to get this done? thanks</p>