I have two text fields. Only numerical values ββand other hexadecimal values ββare accepted. I use NSNumberformatter to set numeric input, for example:
NSNumberFormatter *formatter; formatter = [[[NSNumberFormatter alloc] init] autorelease]; [formatter setNumberStyle:NSNumberFormatterNoStyle];
And then apply it to the TextField.
How can I do the same but only accept Hex values? By hex, I mean 1234567890ABCDEF.
Alternatively, if this is not possible, how can I verify that the text on this TextField is hex?
thanks
source share