我遇到NSMutableParagraphStyle
的问题 NSMutableParagraphStyle *pageStyle = [[NSMutableParagraphStyle alloc] init];
[pageStyle setLineSpacing:14];
[pageStyle setAlignment:NSTextAlignmentJustified];
[pageStyle setFirstLineHeadIndent:5];
[pageString addAttribute:NSParagraphStyleAttributeName value:pageStyle range:NSMakeRange(0, self.pageText.length)];
[pageString addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"Helvetica" size:20] range:NSMakeRange(0, self.pageText.length)];
[pageString addAttribute:NSForegroundColorAttributeName value:[UIColor blueColor] range:NSMakeRange(0, self.pageText.length)];
self.myTextView.attributedText = pageString;
所有这些都正常工作,除非
[pageStyle setAlignment:NSTextAlignmentJustified];
[pageStyle setFirstLineHeadIndent:5];
我该怎么办?