简体   繁体   中英

Decipher How Many Characters in a UITextField

How can I find out from Xcode how many characters are in a UITextField on Interface Builder.

I already have the IBOutlets all connected, I just need to know how to decipher how many characters are in a UITextField.

Thanks in advance!

Something like this should do the trick:

[textField.text length];

That method returns a NSUInteger .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM