Sizing labels with -[NSString sizeWithFont:…] – WRONG

Right:

CGSize maxSize = CGSizeMake(200.0f, CGFLOAT_MAX);
CGSize requiredSize = [label sizeThatFits:maxSize];
label.frame = CGRectMake(10, 10, size.width, size.height);

More details

0 Responses to “Sizing labels with -[NSString sizeWithFont:…] – WRONG”


  • No Comments

Leave a Reply

You must login to post a comment.