UIlabel AttributedString第一行缩进

时间:2015-07-10 04:21:20

标签: ios nsattributedstring

  1. 标签文字第一行需要缩进,我使用NSMutableParagraphStyle setFirstLineHeadIndent
  2. 但是当标签只有一行时,AttributedString拦截后面省略了几个字符,为什么?

    NSMutableParagraphStyle *style = [NSMutableParagraphStyle new];
    [style setFirstLineHeadIndent:11];
    [[NSAttributedString alloc] initWithString:@"abcdefg" attributes:dic];
    

0 个答案:

没有答案