0

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.

4

1 回答 1

1

Add to your UITextFieldDelegate (or UITextViewDelegate) :

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
  NSLOG(@"USER PRESS: %@", string);
}
于 2009-07-30T11:34:48.837 回答