Applying shadow to UITextView.layer?
03:57 28 Feb 2012

I want to apply a shadow on UITextView to make it look like UITextField.

This is my current code:

textView.layer.shadowOpacity=0.8;
textView.layer.shadowColor=[[UIColor lightGrayColor] CGColor];
textView.layer.shadowOffset=CGSizeMake(0, 0);
textView.layer.shadowRadius=3;
textView.layer.cornerRadius=3;

It gives shadow to the text of UITextView if the UITextView background is transparent.

How can I make UITextView look like the image?

enter image description here

iphone objective-c ios ipad