iOS根据文字计算高度

mac2022-06-30  28

CGSize strSize = [str boundingRectWithSize:CGSizeMake(W, H) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:font]} context:nil].size;

转载于:https://www.cnblogs.com/piaojin/p/6542752.html

相关资源:iOS YYLabel计算富文本高度
最新回复(0)