Basically i have a login View which has a subview and it has a UIActivityView and Label saying "Signing In....", this subview has a corners which are not "round", how i can make them to look like "rounded"

Is there anyway to do it using IB?

+36  A: 

Try this

view.layer.cornerRadius = 5;
Ed Marty
There is no such cornerRadius property.
You have to #import <QuartzCore/QuartzCore.h> first.
Note that property only exists in iPhone 3.0, not earlier versions.
Kendall Helmstetter Gelner
I just have to say that this was one of the most immediately satisfying answers I've ever seen on SO. Checking here first just saved me an hour of fighting with an image editor and would have made my view more brittle to color / sizing changes. Thanks!
Justin Searls
Related note: anyone interested in more visual goodies (i.e. shadow) to easily apply to a UIView should check out the CALayer class reference. Most of it is as easy as setting one or two property values, like the above answer:
Justin Searls
You are the man! So easy! :)
Chintan Patel
I have tried this on a view that was loaded from a nib file, and it didn't work.
Ben Collins
Didn't work as in nothing happened or didn't compile?
Ed Marty
see this link
@Ben Collins (or anyone else who has this problem), make sure your view has "clip subviews" set. You can check this in interface builder.
Thank you very much!
+5  A: 

Another method is here.

one more