views:

787

answers:

2

I've just received a lot of good responses to the question about making overlay views. http://stackoverflow.com/questions/2253334/is-there-a-way-that-i-can-make-an-overlay-view-on-the-iphone-sdk

Another question I have is how to make an overlay view have round edges like in the Skype iPhone app or in the Phone.app.

Thanks.

+5  A: 

You can use these helper functions and then mask/clip to the resulting CGPath:

http://fabian-kreiser.com/index.php?id=1135350598525812781

Or use view.layer.cornerRadius, as seen in http://stackoverflow.com/questions/510382/how-do-i-create-a-round-cornered-uilabel-on-the-iphone/512402.

MrMage
+1 for view.layer.cornerRadius
Sixten Otto
This blog post I wrote might help too: http://www.cimgf.com/2010/01/28/fun-with-uibuttons-and-core-animation-layers/
Matt Long
i find this is goodhttp://cocoabugs.blogspot.com/2010/08/add-rounded-corners-and-border-to.html
jeeva
+2  A: 

Use the view.layer's cornerRadius property.

#include <QuartzCore/QuartzCore.h>

...

overlayView.layer.cornerRadius = 5.0;
jessecurry