
NSDictionary *atributDic = @{NSFontAttributeName:[UIFont systemFontOfSize:12*kScreenScaleX], NSParagraphStyleAttributeName:paraStyle, NSKernAttributeName:@0.2f,NSBaselineOffsetAttributeName:@(2)};
NSAttributedString *titleAttributeStr = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@",contentString] attributes:atributDic];
通过属性 NSBaselineOffsetAttributeName 可设置UILabel内容的上下偏移距离
网友评论