zoukankan      html  css  js  c++  java
  • 疑难杂症,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];

  • 相关阅读:
    poj1581
    poj3094
    poj2196
    poj1003
    poj2262
    poj1083
    poj3299
    poj2739
    poj1552
    js 获取元素高度和宽度
  • 原文地址:https://www.cnblogs.com/guligei/p/3747867.html
Copyright © 2011-2022 走看看