Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UILabel *testLabel = [[UILabel alloc] init];
- [testLabel setText:@"$1,500"];
- testLabel.textColor = [UIColor greenColor];
- testLabel.backgroundColor = [UIColor clearColor];
- testLabel.font = [UIFont fontWithName:@"Arial" size:24.0];
- CGSize finalSize = [testLabel sizeThatFits:CGSizeMake(480, 320)];
- // I have to multiply by 2 because of retina. No idea why I would need to multiply by 3.
- [testLabel setFrame:CGRectMake(0, 0, finalSize.width * 2.0, finalSize.height * 2.0)];
- /// Then, take this testLabel and dump it to bytes, render to OpenGL texture, and draw orthographic (2d) pixel-accurate drawing of it with the dimensions of (frame width by frame height)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement