I am trying to make a label which displays properly on both landscape and portrait mode. The label looks fine when i am in portrait mode but when i switch to the landscape mode the label is not aligned correctly.Is there a way to adjust the UIlabel automatically when the screen is switched from one mode to another.
Edit: This is the code that i have
UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(100 , 100, 100, 100)];
[label setText:@"xxx."];
label.adjustsFontSizeToFitWidth=YES;
[self.view addSubview:label];
[label release];
I have also created a NStimer method which discards the label after 5 seconds