1、引入
在文件导入
#import <CoreText/CoreText.h>
2、程序
NSMutableAttributedString *attributedString =[[NSMutableAttributedString alloc]initWithString:@"你的字符串"]; long number = 5.0f;//间距 CFNumberRef num = CFNumberCreate(kCFAllocatorDefault,kCFNumberSInt8Type,&number); [attributedString addAttribute:(id)kCTKernAttributeName value:(__bridge id)num range:NSMakeRange(0,[attributedString length])]; CFRelease(num); [ColumnIntroduce setAttributedText:attributedString];