我有一个NSSegmentedControl(todayButton),其中包含一张图片。 我正在尝试使用以下方法在图像上绘制一些文本:
NSImage *img = [todayButton imageForSegment:0]
[img lockFocus]
[@"15" drawAtPoint:NSZeroPoint withAttributes:nil]
[img unlockFocus]
[img setTemplate:YES]
图像被设置为模板,没有出现错误,但图像上没有出现任何文本。