此代碼不繪製白色文字,爲什麼?這段代碼爲什麼不畫白色文字?
NSMutableParagraphStyle* style = [[NSMutableParagraphStyle alloc] init];
[style setAlignment:NSCenterTextAlignment];
NSFont *font = [NSFont fontWithName:@"System" size:13];
NSDictionary *attrs = [NSDictionary dictionaryWithObjectsAndKeys:style, NSParagraphStyleAttributeName, font, NSFontAttributeName, [NSColor whiteColor], NSForegroundColorAttributeName, nil];
[button.title drawInRect:textRect withAttributes:attrs];
然後它畫什麼顏色? – CodaFi 2013-03-09 00:33:06
什麼是textRect? – 2013-03-09 00:33:48
它繪製標準黑色 – rokstar 2013-03-09 00:43:06