如何用drawInRect()显示中文?
我的代码做了如下:
NSString* sCands = [NSString stringWithUTF8String:"欢迎"];
//struct __GSFont * font=[NSClassFromString(@"WebFontCache") createFontWithFamily:@"STHeiti" traits:2 size:18.];
//struct __GSFont * font=GSFontCreateWithName("Helvetica", kGSFontTraitBold,18);
struct __GSFont * font=GSFontCreateWithName("STHeiti", kGSFontTraitBold,18);
[sCands drawInRect:_rectCand withFont:font];
呜呼,中文显示不出来!
请高手们帮忙。