Creating Masked text fields with OCMaskedTextField is extremely easy and this code example from the readme shows how to set up a text field with masking for number entry:
OCMaskedTextFieldView *textField = [[OCMaskedTextFieldView alloc] initWithFrame:CGRectMake(20, 94, 280, 33) andMask:@"TR - #### #### #### #### #### ####" showMask:YES];
Here’s an image showing several masked text fields from the readme:
You can find OCMaskedTextField on Github here.
A handy library to have if you’re looking to create some masked text/number entry fields.