tags:

views:

38

answers:

2

How to make UIlabel roundRect shape ? By changing background color of UILabel it looks like a rectangle in shape I want to make it look like a roundrect in shape.

Thanks.

A: 

If you mean to give the label a rounded-rectangle border, you can do that by setting the cornerRadius, borderWidth, and borderColor properties of the label's layer.

Ole Begemann
please explain how to use these properties
Gyani
Look them up in the documentation, the info is all there.
Ole Begemann
@Gyani - you need to look into CALayer class for those properties
Vladimir
A: 

first import file

#import <QuartzCore/QuartzCore.h>

and than set the property of UIlabel as

yourLabel.layer.cornerRadius = kCornerRadius;
Gyani