views:

441

answers:

1

Hi,

I'm trying to build an app that is a code breaking puzzle for the user. I've followed sample code on how to add a decimal to the numeric keypad and it works great. I would like to expand this so the whole keyboard is filled with custom images.

Is it possible to have a piece of code that when the user presses on a symbol the iPhone reads it as an "A" for example?

Thanks for any and all help.

+1  A: 

Add to your UITextFieldDelegate (or UITextViewDelegate) :

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
  NSLOG(@"USER PRESS: %@", string);
}
oxigen