I have a textfield that I would like to use for multiple types of input. I have two custom NSFormatter classes that I would like to use for that field depending on what kind of input the user would like to provide. The input type is selected by a popup button before data is entered in the text field. I have an IBAction for the popup button and in it's method I do the following:
[myTextField setFormatter:formatter];
This doesn't enable the formatter as expected. The only time the formatter works is when I set it in my awakeFromNib function. Is there a method I need to call to refresh the text field after setting the formatter to make it work?
I tried updating the display via:
[myView setNeedsDisplay:YES]
but that doesn't produce the desired result as well.