views:

86

answers:

1

How do I add a character to a UITextField from ASCII or Unicode character set when a custom key is pressed?

Disclaimer: I've seen tons of questions here on Stack Overflow, but I haven't gotten all the information I need to make a hebrew keyboard.

A: 

When your custom key (the simplest case:UIButton) is pressed you append a certain string to uitextfield.text property.

uitextfield.text = [uitextfield.text stringByAppendingString:@"yourAsciiString"];

the way you convert ascii to strings the same way you will do it in C then you convert that C string to NSString using:

- (id)initWithCString:(const char *)nullTerminatedCString encoding:(NSStringEncoding)encoding
nacho4d