Question: I did by code the following:

```
UILabel  * label = [[UILabel alloc] initWithFrame:CGRectMake(40, 70, 300, 50)];
    label.backgroundColor = [UIColor clearColor];
    label.textAlignment = UITextAlignmentCenter; // UITextAlignmentCenter, UITextAlignmentLeft
    label.textColor=[UIColor whiteColor];
    label.text = @"Telechargez et consultez les catalogues et les tarifs de la gamme Audi au format PDF";
    [self.view addSubview:label];

```

And it looks like [this](http://i56.tinypic.com/2w2oig9.png)
but I want it to look like [this](http://i51.tinypic.com/fxux50.png). How to change the label's properties?

Answer: 
Try this:

```
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(40, 30, 300, 50)];
    label.backgroundColor = [UIColor clearColor];
    label.textAlignment = NSTextAlignmentCenter;
    label.textColor = [UIColor whiteColor];
    label.numberOfLines = 0;
    label.lineBreakMode = UILineBreakModeWordWrap;
    label.text = @"Telechargez et consultez les catalogues et les tarifs de la gamme Audi au format PDF";
    [self.view addSubview:label];

```
One Minor Change on iOS 6 or later is that the 

```
label.textAlignment = UITextAlignmentCenter;

```

is deprecated so use 

```
label.textAlignment = NSTextAlignmentLeft;

```

instead.