开发者

How to type a square character in Xcode?

开发者 https://www.devze.com 2023-01-19 04:03 出处:网络
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:

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

精彩评论

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