M
M
MagoVinch2014-05-23 22:20:17
Objective-C
MagoVinch, 2014-05-23 22:20:17

How to restrict character input in UITextfield?

I give the dictionary application and I need to prohibit entering the text field of the word in Russian!
How can I do that?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AlexKar, 2014-05-24
@AlexKar

UITextField provides a wonderful delegate method - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string - which is great for validating input. And for the check itself, it’s more convenient for me to use the regular expression - stackoverflow.com/questions/15392031/uitextfield-t...

V
Vanya Ivanov, 2015-01-04
@mr_cloud

https://vk.com/videos-58860049?section=all&z=video...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question