2
UITextView 내에서 NSTextAttachment 이미지의 가로 위치를 변경하려고합니다. 나는 설정을 시도했다NSTextAttachment 커닝
[attributedString setAttributes:@{NSKernAttributeName:@(1.5)} range:NSMakeRange(0, 1)];
이것은 단순히 적절한 커닝 공간을 제공하면서 첨부 파일을 사라지게한다. 나는 또한 원점 x 좌표를 변경하려고 시도했다.
- (CGRect)attachmentBoundsForTextContainer:(NSTextContainer *)textContainer proposedLineFragment:(CGRect)lineFrag glyphPosition:(CGPoint)position characterIndex:(NSUInteger)charIndex
이것은 부착물의 수평 위치에는 영향을 미치지 않는다. 알려주십시오.