2012-03-11 65 views
0

我有一个用于测试的滑块,我希望滑块位置表示的字符显示在文本字段中。但是我的文本字段只在下面运行我的解决方案时显示A-Z和a-z。我怎样才能在我的文本字段中获得Unicode字符?在文本字段中显示Unicode字符

- (IBAction) doSlider: (id) sender 
    { 
     long long theNum = [sender intValue]; 
     NSString *vc_theString = [NSString stringWithFormat:@"%c", theNum]; 
     [charField  setStringValue:vc_theString2]; 
    } 

回答

2

%c从C继承并限制在8位范围内。您应该使用%C,它将在相应的参数中读取为unichar