【发布时间】:2011-02-11 19:38:16
【问题描述】:
我正在尝试创建一个带有删除线的属性字符串,但是,这个简单的任务似乎比我预期的更难弄清楚。这是我目前拥有的(不起作用)。感谢您的帮助!
NSAttributedString *theTitle = [[[NSAttributedString alloc] initWithString:@"strikethrough text" attributes:[NSDictionary dictionaryWithObjectsAndKeys:[NSColor whiteColor], NSForegroundColorAttributeName, NSUnderlinePatternSolid, NSStrikethroughStyleAttributeName, nil]] autorelease];
【问题讨论】:
标签: cocoa