¡@

Home 

2014/10/15 ¤U¤È 10:13:59

iphone Programming Glossary: setshadowopacity

Can't add a corner radius and a shadow

http://stackoverflow.com/questions/3316424/cant-add-a-corner-radius-and-a-shadow

got no way to add both effects at the same time. I'm adding a shadow with layer setShadowOffset CGSizeMake 0 3 layer setShadowOpacity 0.4 layer setShadowRadius 3.0f layer setShouldRasterize YES Here layer is a CALayer of a UIView subclass. So this works.. path of the shadow with a rounded rect. Keep the radius of the two the same layer setShadowOffset CGSizeMake 0 3 layer setShadowOpacity 0.4 layer setShadowRadius 3.0f layer setShouldRasterize YES layer setCornerRadius 12.0f layer setShadowPath UIBezierPath.. setting those parameters 'just works' but I'll provide it for posterity sake. To recap this is now all you need layer setShadowOpacity 0.4 layer setCornerRadius 12.0f If you still need better performance you can go ahead and set the shouldRasterize parameter..

Quartz based drop shadows don't work for me on UITextView

http://stackoverflow.com/questions/4401730/quartz-based-drop-shadows-dont-work-for-me-on-uitextview

UIColor blackColor CGColor desc.layer setShadowRadius 2.0f desc.layer setShadowOffset CGSizeMake 1 1 desc.layer setShadowOpacity 0.8f Is this something I'm missing I was hoping to use quartz to add a border and a drop shadow. The border code does work..

UIView with rounded corners and drop shadow?

http://stackoverflow.com/questions/4754392/uiview-with-rounded-corners-and-drop-shadow

.CGColor v.layer setBorderWidth 1.5f drop shadow v.layer setShadowColor UIColor blackColor .CGColor v.layer setShadowOpacity 0.8 v.layer setShadowRadius 3.0 v.layer setShadowOffset CGSizeMake 2.0 2.0 You can adjust the settings to suit your needs...