CGFloat mapLableWidth =[[NSString stringWithFormat:@"项目位置:%@",[[NSUserDefaults standardUserDefaults] objectForKey:@"DetailEnlargeAddress"]] boundingRectWithSize:CGSizeMake(self.frame.size.width - 80*HomePageDefineWidth, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15*HomePageDefineWidth]} context:nil].size.width;
自动计算UILabel的宽度或则高度
最新推荐文章于 2018-10-16 10:37:00 发布