On top header area
#define kDefaultCellFont [UIFont fontWithName:@"HoboStd" size:10.0f]
NSString *text = @"This is a simple example of the versatility of blocks, but the standard frameworks are chock-full of other use cases. NSArray lets you sort elements with a block via the sortedArrayUsingComparator: method, and UIView uses a block to define the final state of an animation via the animateWithDuration:animations: method. Blocks are also a powerful tool for concurrent programming."
NSString *trimmedContent = [text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
constraintSize = CGSizeMake(<WIDTH of Label>, MAXFLOAT);
//You will need to define kDefaultCellFont
CGSize labelSize = [trimmedContent sizeWithFont:kDefaultCellFont
constrainedToSize:constraintSize
lineBreakMode:NSLineBreakByWordWrapping];
labelSize.height = ceil(labelSize.height)+5;
0 Comment(s)