我正试图在iOS 7.1中的UILabel中描边文本。我无法弄清楚为什么它不起作用...任何帮助将不胜感激。
NSMutableDictionary *stringAttributes = [NSMutableDictionary dictionary];
[stringAttributes setObject: [UIFont fontWithName:@"Helvetica" size:20] forKey: NSFontAttributeName];
[stringAttributes setObject: [UIColor whiteColor] forKey: NSForegroundColorAttributeName];
[stringAttributes setObject: [NSNumber numberWithFloat: 2.0] forKey: NSStrokeWidthAttributeName];
[stringAttributes setObject: [UIColor blackColor] forKey: NSStrokeColorAttributeName];
[label.text drawInRect:CGRectMake(0, 0, 200, 50) withAttributes:stringAttributes];