iOS - 固定高度,获取动态宽度

      CGFloat startW = [text sizeWithFont:[UIFont systemFontOfSize:13] constrainedToSize:CGSizeMake(MAXFLOAT, loginPhoneDetailV1H)].width;
      CGFloat startW  = [self.loginPhoneDetailV1.attributedText boundingRectWithSize:CGSizeMake(MAXFLOAT, loginPhoneDetailV1H) options:NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading context:nil].size.width;

你可能感兴趣的:(iOS - 固定高度,获取动态宽度)