I have two TextFields. One accepts only numerical values and the other hex values. I am using NSNumberformatter
to set the numerical-only input, like:
NSNumberFormatter *formatter;
formatter = [[[NSNumberFormatter alloc] init] autorelease];
[formatter setNumberStyle:NSNumberFormatterNoStyle];
And then apply it to the TextField.
How do I do the same but only accepting Hex values? By hex I mean 1234567890ABCDEF.
Alternatively, if it cannot be done, how do I check that the text on that TextField is hex?
Thanks