How is a rounded rect view with transparency done on iphone?

As of iPhone SDK 3.0, you can simply use the layer’s cornerRadius property. E.g.:

view.layer.cornerRadius = 10.0;

Along the same lines, you can change the view’s border color and width:

view.layer.borderColor = [[UIColor grayColor] CGColor];
view.layer.borderWidth = 1;

Leave a Comment