I have searched apple’s documentation and other posts on Stack Overflow, but I’m still having trouble adding a shadow to the inside of a UITextView. I would like to make it look like a UITextField. Here’s the code that I’ve tried.
CALayer *frontLayer = self.frontField.layer;
[frontLayer setBorderColor:CGColorCreate(CGColorSpaceCreateDeviceGray(), nil)];
[frontLayer setBorderWidth:1];
[frontLayer setCornerRadius:5];
[frontLayer setShadowRadius:10.0];
CGSize shadowOffset = {0.0,3.0};
[frontLayer setShadowOffset:shadowOffset];
[frontLayer setShadowOpacity:1];
self.frontField.clipsToBounds = YES;
Where am I going wrong?
Start off simple and try this:
to optimise performance also add:
Then you can add your other properties back in 1 by 1 and see what is causing an issue for you.