我正在设置段落样式,如下所示:
NSTextStorage *textStorage = self.textView.textStorage;
NSMutableParagraphStyle *paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
paragraphStyle.paragraphSpacing = FBTweakValue(@"Authoring View", @"Paragraph Style", @"Paragraph Spacing", 40.f);
[textStorage setAttributes:@{NSParagraphStyleAttributeName : paragraphStyle} range:[textStorage fullRange]];
编辑:我在下面找到了部分答案——它可以很好地修复单行插入符号。但是,当您将选择范围拖出多个单词时,您会得到:
回到原点!那么如何指定插入符号的高度呢?
注意:我的问题之前曾在 StackOverflow 上发布过一次,但被毫不客气地删除了。如果你要这样做,请至少给我一个理由。谢谢。