Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding drop shadow to UIWebView and UITextView

I have a UITextView and a WebView side by side and I would like to add a drop shadow to both. This is an iPad app, so they rotate, thus an ImageView under them probably would not work. Any ideas?

like image 574
user288225 Avatar asked Apr 01 '10 16:04

user288225


1 Answers

UIViews have CALayers, that have some built-in shadow support. Try these properties out:

view.layer.shadowColor
view.layer.shadowOffset
view.layer.shadowOpacity
view.layer.shadowRadius

That may get you what you need pretty quickly. You might need to #import <QuartzCore/QuartzCore.h> to get the compiler to understand what's going on.

like image 77
jexe Avatar answered Sep 21 '22 14:09

jexe