疑难杂症,sizetofit,

    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.xself.contentLabel.frame.origin.y,

self.contentLabel.frame.size.width, rect.height);

    [self.contentLabelsizeToFit];

posted @ 2014-05-23 15:42  路在脚下,  阅读(170)  评论(0编辑  收藏  举报