CGSize size = [model.username sizeWithAttributes:@{NSFontAttributeName : font_16}];
self.labelUsername.bounds = CGRectMake(0, 0, size.width, size.height);
CGSize size = [model.username sizeWithAttributes:@{NSFontAttributeName : font_16}];
self.labelUsername.bounds = CGRectMake(0, 0, size.width, size.height);
本文标题:根据字符串计算label的长度
本文链接:https://www.haomeiwen.com/subject/tbtqattx.html
网友评论