【发布时间】:2014-10-15 03:00:11
【问题描述】:
我正在尝试更改 UITextView 中 NSTextAttachment 图像的水平位置。我试过设置
[attributedString setAttributes:@{NSKernAttributeName:@(1.5)} range:NSMakeRange(0, 1)];
这只是让附件消失,同时给我适当的字距调整空间。我也尝试在
中更改原点 x 坐标- (CGRect)attachmentBoundsForTextContainer:(NSTextContainer *)textContainer proposedLineFragment:(CGRect)lineFrag glyphPosition:(CGPoint)position characterIndex:(NSUInteger)charIndex
这对附件的水平位置没有影响。 请指教。
【问题讨论】:
标签: ios uitextview textkit kerning nstextattachment