Responding to custom key presses on the iPad?
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.
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
精彩评论