CGSize rect = [info.contentsizeWithFont:self.contentLabel.fontconstrainedToSize:CGSizeMake(self.contentLabel.frame.size.width, MAXFLOAT)];
self.contentLabel.text = info.content;
self.contentLabel.frame = CGRectMake(self.contentLabel.frame.origin.x, self.contentLabel.frame.origin.y, 250, rect.height);
self.contentLabel.frame = CGRectMake(self.contentLabel.frame.origin.x, self.contentLabel.frame.origin.y,
self.contentLabel.frame.size.width, rect.height);
[self.contentLabelsizeToFit];
疑难杂症,sizetofit,,布布扣,bubuko.com
原文:http://www.cnblogs.com/guligei/p/3747867.html