【发布时间】:2020-08-20 06:54:22
【问题描述】:
我有以下代码在图像上绘制文本。如何绘制倾斜 90 度的文本
let textStyle = NSMutableParagraphStyle.default.mutableCopy() as! NSMutableParagraphStyle
let textFontAttributes = [
NSAttributedStringKey.font: font,
NSAttributedStringKey.foregroundColor: textcolor,
NSAttributedStringKey.paragraphStyle: textStyle
]
text.draw(in: textRect, withAttributes: textFontAttributes)
【问题讨论】:
-
你看到这个答案了吗? stackoverflow.com/questions/10289898/…
-
@Russell 这些答案适用于
iphone -
我的错 - 我假设一切都是 iPhone!
-
@Russell 感谢您的帮助 :)