title: UITextView Inner Shadow
body: <p>I'm trying to create an inner shadow on only the top portion of a <code>UITextView</code>, but I'm having some difficulty. I'm borrowing code from <a href="https://stackoverflow.com/questions/4431292/inner-shadow-effect-on-uiview-layer">this</a> post, but I don't understand exactly what's going on.</p>
  
  <pre><code>CAShapeLayer* shadowLayer = [CAShapeLayer layer];
  [shadowLayer setFrame:[self bounds]];
  
  // Standard shadow stuff
  [shadowLayer setShadowColor:[[UIColor colorWithWhite:0 alpha:1] CGColor]];
  [shadowLayer setShadowOffset:CGSizeMake(0.0f, 0.0f)];
  [shadowLayer setShadowOpacity:1.0f];
  [shadowLayer setShadowRadius:5];
  
  // Causes the inner region in this example to NOT be filled.
  [shadowLayer setFillRule:kCAFillRuleEvenOdd];
  
  // Create the larger rectangle path.
  CGMutablePathRef path = CGPathCreateMutable();
  CGPathAddRect(path, NULL, CGRectInset(bounds, -42, -42));
  
  // Add the inner path so it's subtracted from the outer path.
  // someInnerPath could be a simple bounds rect, or maybe
  // a rounded one for some extra fanciness.
  CGPathAddPath(path, NULL, someInnerPath);
  CGPathCloseSubpath(path);
  
  [shadowLayer setPath:path];
  CGPathRelease(path);
  
  [[self layer] addSublayer:shadowLayer];
  </code></pre>
  
  <p>What exactly is "someInnerPath" if I want a simple shadow at only the top of a rectangular UITextView (I don't need the rounded effect).</p>