title: Apply inner-shadow to UILabel
body: <p>I want to apply inner-shadow to a UILabel. I have a solution, but it's not good enough. Anyone with a better solution?</p>
  
  <pre><code>// UILabel subclass
  
  - (void) drawTextInRect:(CGRect)rect {
      CGSize myShadowOffset = CGSizeMake(0, 2);
      float myColorValues[] = {255, 0, 0, 1};
  
      CGContextRef myContext = UIGraphicsGetCurrentContext();
      CGContextSaveGState(myContext);
  
      CGColorSpaceRef myColorSpace = CGColorSpaceCreateDeviceRGB();
      CGColorRef myColor = CGColorCreate(myColorSpace, myColorValues);
  
      CGContextSetShadowWithColor (myContext, myShadowOffset, 5, myColor);
      CGContextSetBlendMode(myContext, kCGBlendModeLighten);
  
      [super drawTextInRect:rect];
  
      CGColorRelease(myColor);
      CGColorSpaceRelease(myColorSpace); 
  
      CGContextRestoreGState(myContext);
  }
  </code></pre>
  
  <p>I'm familiar with the layer property of UILabel, but <code>shadow offset</code> gives us a outer-shadow, NOT inner-shadow (unless i'm missing something).</p>