I think the background on the UITextField
is an image, so it doesn't match your angle. Creating the inner shadow is difficult in iOS. You have 2 options.
1) Use image as background for UITextField
2) Set the shadow programmatically (but it looks less attractive than option 1).
Here is the code to set the rounded inner shadow for the text box with the solution from @Matt Wilding
_textField.layer.cornerRadius = 10.0f; CAShapeLayer* shadowLayer = [CAShapeLayer layer]; [shadowLayer setFrame:_textField.bounds];
Do not forget to import
#import <QuartzCore/QuartzCore.h>
source share