开发者

How to type a square character in Xcode?

How do I type a square character in Xcode? Not as program code but in a string.

I tried to copy a character but its not working. I am still stuck with:

开发者_C百科aCounty.area = @"301.338 km2";


    const UniChar square = 0x00B2;
    NSString * str = [NSString stringWithFormat:@"%C", square];
    NSLog(@"301 km%@", str);

you can get the character code from OS X's "Special Characters…" menu item

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜