草庐IT

Descenders

全部标签

iphone - 寻找 : iOS 6 NSAttributedString Descenders Block Underline 的解决方法

我正在使用NSAttributedString(和NSMutableAttributeString)通过UIGraphicsBeginPDFContextToFile写入PDF。当我输出带有下划线属性的属性字符串时,下划线会在字母下行部分超过下划线时断开。这是显示当前输出的示例(屏幕截图):下面是构建示例属性字符串的代码:NSAttributedString*ftype=[[NSMutableAttributedStringalloc]initWithString:@"Dangerous"attributes:@{NSParagraphStyleAttributeName:pstyle