//计算字符串高度的方法
-(CGFloat)stringHeight:(NSString *)str{
//设置字符串的属性
NSDictionary *dic=@{NSFontAttributeName:[UIFont systemFontOfSize:17]};
//计算字符串的区域
CGRect rect=[str boundingRectWithSize:CGSizeMake(375, 667) options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
return rect.size.height;
}