I have the following CALayer:
CAGradientLayer *gradient = [CAGradientLayer layer]; gradient.frame = CGRectMake(8, 57, 296, 30); gradient.cornerRadius = 3.0f; gradient.colors = [NSArray arrayWithObjects:(id)[RGB(130, 0, 140) CGColor], (id)[RGB(108, 0, 120) CGColor], nil]; [self.layer insertSublayer:gradient atIndex:0];
I would like to add the effect of inner shadow , but I'm not quite sure how to do this. I suppose I will need to draw drawRect, however this will add a layer on top of other UIView objects, since it should be a panel behind some buttons, so I don’t understand what to do?
I could add another layer, but again, not sure how to achieve the inner shadow effect (for example:

Help evaluate ...
iphone core-graphics calayer
runmad Dec 13 '10 at 16:55 2010-12-13 16:55
source share