IPhone how to write a character on a label?

I am going to develop an application for the iPhone. But I'm stuck with one place. I want to write some character on a shortcut from an xib file.

The characters are not on the keyboard, but we can get it by the ASCII value.

for example: the ACSII value for the mue character is 230, but how to print this mue character on a label that I don’t know.

So please help me with this.

Thanks in advance.

+4
source share
7 answers

Use any editor you like to create this character and open your xib in Xcode and just copy / paste it?

+3
source

Use NSUTF8StringEncodingto encode your string.

For instance,

NSString *str = [NSString stringWithUTF8String:"your string for encoding"];

[lblName setText:str];

:

- (NSString *) decodedString:(NSString *) originalString {
    NSString *newString = [NSString stringWithUTF8String:[originalString cStringUsingEncoding:[NSString defaultCStringEncoding]]];
    return newString;
}

.

+3

" " -Panel . . , cmd + opt + t

UILabel.

btw: option + m= μ

+2

, "μ", ?

, , "option" "m" Macintosh, XIB.

+2

, :

NSString *muString = [NSString stringWithFormat:@"%C", 0x03BC];

0x, .

+2

"Alt" + "m" , XIB , "Alt" , "Alt" ( ).

+2

Press "Command" + "Control" + "Space" will open a menu of special characters. Check if the required character is present. If this is not the case, click the gear icon, then select the category you want - add it to the list.

See screenshot below.

+2
source

All Articles