NSString+LIVE.m 1.01 KB
//
//  NSString+LIVE.m
//  yohoLive
//
//  Created by jhsonzhi on 16/8/9.
//  Copyright © 2016年 NewPower. All rights reserved.
//

#import "NSString+LIVE.h"
#import <CoreGraphics/CoreGraphics.h>
#import "UtilsMacros.h"

@implementation NSString (LIVE)

//- (CGFloat)singleLineWidthWithFont:(UIFont *)font
//{
//    if (iOS7_OR_LATER) {
//        return ceilf([self boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MIN) options:0 attributes:@{NSFontAttributeName:font} context:nil].size.width);
//    }
//    else {
//        return [self sizeWithFont:font constrainedToSize:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MIN)].width;
//    }
//}
//
//- (CGFloat)singleLineHeightWithFont:(UIFont *)font
//{
//    if (iOS7_OR_LATER) {
//        return ceilf([self boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MIN) options:0 attributes:@{NSFontAttributeName:font} context:nil].size.height);
//    }
//    else {
//        return [self sizeWithFont:font constrainedToSize:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MIN)].height;
//    }
//}
@end