Created
January 21, 2011 02:02
-
-
Save mike3k/789122 to your computer and use it in GitHub Desktop.
use sizeOfString to resize a view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CGSize constraint = CGSizeMake(200000.0, 10.0); | |
CGSize size = [sourceLabel.text sizeWithFont:[UIFont italicSystemFontOfSize:7.0] constrainedToSize:constraint | |
lineBreakMode:UILineBreakModeTailTruncation]; | |
sourceLabel.frame = CGRectMake(318.0 - size.width, | |
quantityPickerView.frame.origin.y, | |
size.width, | |
size.height); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment