i am fetching the content of my uilabel from the web service so i want to make the uilabel to be dynamic. I want the uilabel to adjust its width depending on how long its content.
the code i have only reduced the size of the text.
lblWinDesc = [[UILabel alloc] initWithFrame:CGRectMake(winDesString.frame.origin.x, winDesString.frame.origin.y + winDesString.frame.size.height, topLine.frame.size.width, lblOwnerName.frame.size.height)];
lblWinDesc.adjustsFontSizeToFitWidth = YES;
lblWinDesc.numberOfLines =0;
lblWinDesc.layer.borderColor = [UIColor whiteColor].CGColor;
[lblWinDesc setFont:[UIFont boldSystemFontOfSize:20]];
[lblWinDesc setTextColor:[UIColor whiteColor]];
[contentScrollView addSubview:lblWinDesc];
i want the label to increase its height when the character/word reaches the maximum width of the uilabel