Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UILabel *myLabel = [[UILabel alloc] init];
- myLabel.text = @"There are three types of people in this world: those who make things happen, those who watch things happen, and those who wonder what happened. Which do you want to be?";
- myLabel.numberOfLines = 0;
- CGSize maxLabelSize = CGSizeMake(self.view.frame.size.width - 32.0f, FLT_MAX);
- CGSize expectedLabelSize = [myLabel sizeThatFits:maxLabelSize];
- myLabel.frame = CGRectMake(16.0f, 16.0f, expectedLabelSize.width, expectedLabelSize.height);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement