我想将NSTextAttachment图像附加到我的属性字符串并使其垂直居中.
我使用以下代码来创建我的字符串
NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:DDLocalizedString(@"title.upcomingHotspots") attributes:attrs];
NSTextAttachment *attachment = [[NSTextAttachment alloc] init];
attachment.image = [[UIImage imageNamed:@"help.png"] imageScaledToFitSize:CGSizeMake(14.f, 14.f)];
cell.textLabel.attributedText = [str copy];
Run Code Online (Sandbox Code Playgroud)
但是,图像看起来与单元格textLabel的顶部对齐.

如何更改绘制附件的矩形?