What you could do is the following:
- Check the length of the string
- If length mod 2 == 0 then add "/"
- Log your string
I'm not saying this is recommended but it might help you a bit!
- (void)controlTextDidChange:(NSNotification *)obj{
NSString *num = [textField stringValue] ;
if (num.length%2==0)
{
NSString *someText = [NSString stringWithFormat: @"%@/ ", num];
num = someText;
}
textField.stringValue = num;
}