title: Adding a drop shadow to NSString text in a drawRect: method without using UILabel
body: <p>I'd like to add a drop shadow to text drawn using the iOS supplied <code>NSString (UIStringDrawing)</code> category method:</p>
  
  <pre><code>- (CGSize)drawAtPoint:(CGPoint)point forWidth:(CGFloat)width 
               withFont:(UIFont *)font minFontSize:(CGFloat)minFontSize 
         actualFontSize:(CGFloat *)actualFontSize 
          lineBreakMode:(UILineBreakMode)lineBreakMode
     baselineAdjustment:(UIBaselineAdjustment)baselineAdjustment; 
  </code></pre>
  
  <p>Clearly, there's no drop shadow option. </p>
  
  <p>Yes, one could use a UILabel here and get drop shadow properties to set, but that wouldn't be as performant, since any UIView subclass (such as UILabel) wraps a CALayer object and is going to be heavier (performance wise).</p>
  
  <p>Here's the context:</p>
  
  <p>I'm doing custom drawing for a UITableViewCell subclass, implementing <code>drawRect:</code> on the table cell view instead of creating the table cell from a Nib file of composited UIView subclasses. </p>
  
  <p>Compositing a bunch of UIView subclasses would defeat the purpose of trying to keep this lean and stay within 50-60 frames per second in table view scrolling performance.</p>
  
  <p>I have tried drawing the string twice at a slight offset. This may turn out acceptable once I tweak the drop shadow color on the background color of the cell that I have going, but it seems rather kludgey. Certainly there's no drop shadow blur property like one gets with UILabel.</p>
  
  <p>I searched for solutions and they either recommend UILabel usage (which I've dismissed per above, since I have about a dozen distinct textual elements getting composited on to the table cell view) or <code>CGContextSetShadow()</code>. The latter always seems to be suggested in the context of rectangular shapes, and not necessarily for attaching a shadow to the path of text drawn directly with the NSString <code>drawAtPoint...</code> method mentioned above. (I did try it, but it didn't seem to work (i.e. nothing changed); I'm new to Core Graphics drawing).</p>
  
  <p>Suggestions?</p>