计算字符串长度
#pragma mark--计算字符串长度
- (CGSize)strsizewithstr:(NSString *)str{
NSDictionary *attributes = @{NSFontAttributeName:[UIFont systemFontOfSize:20]};
CGSize textSize = [str boundingRectWithSize:CGSizeMake(100, 100) options:NSStringDrawingTruncatesLastVisibleLine attributes:attributes context:nil].size;
return textSize;
}