Forcing entry of certain character types in UITextField

Posted by cannyboy on Stack Overflow See other posts from Stack Overflow or by cannyboy
Published on 2010-06-09T12:57:01Z Indexed on 2010/06/09 13:12 UTC
Read the original article Hit count: 197

Filed under:
|
|

If I have a UITextField which the user is inputing a registration number, which has the format: 11-11-1111

(that is 2 digits, a dash, 2 digits, a dash, four digits)

How do I force the user to enter this kind of data only... so they can't enter anything except 0-9 in the first character, and only '-' for the third character etc.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c