您的位置:首页 > 产品设计 > UI/UE

UILabel调整字间距

2015-06-09 09:33 645 查看
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];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  IOS